Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 244172

Submitted on 14 May 2013 by Mehmet OZC

Correct

34Size
Leading solution size is 11.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
hex =  '#0000FF';
rgb = [0 0 1];
assert(isequal(color_hex2rgb(hex),rgb))

                    
2
Pass
 
%%
hex =  '#33FF00';
rgb = [0.2 1 0];
assert(isequal(color_hex2rgb(hex),rgb))

                    
3
Pass
 
%%
hex =  '#FFCCFF';
rgb = [1 0.8 1];
assert(isequal(color_hex2rgb(hex),rgb))

                    
4
Pass
 
%%
hex =  '#999999';
rgb = [.6 .6 .6];
assert(isequal(color_hex2rgb(hex),rgb))