Coversions Between Color Models

RGB to YIQ

	__  __      __            	   __  __  __
        | Y  |      | .299	.587	.114 | | R  |
	| I  |	 =  | .596     -.275   -.321 | | G  |
	| Q  |      | .212     -.523    .311 | | B  |
     	--  --      ---			  ---- --  --

YIQ to RGB

	__  __      __            	   __  __  __
        | R  |      | 1.0      0.956   0.621 | | Y  |
	| G  |	 =  | 1.0     -0.272  -0.647 | | I  |
	| B  |      | 1.0     -1.106  -1.703 | | Q  |
     	--  --      ---		          ---- --  --

CIE XYZ to RGB

	__  __      __            	         __  __  __
        | R  |      |  1.91	  -0.5338    -0.2891 | | X  |
	| G  |	 =  | -0.9844      1.999     -0.0279 | | Y  |
	| B  |      |  0.0585     -0.1187    -0.9017 | | Z  |
     	--  --      ---			          ---- --  --

RGB to CIE XYZ

	__  __      __            	     __  __  __
        | X  |      | 0.607	0.174	 0.200 | | R  |
	| Y  |	 =  | 0.299     0.587    0.114 | | G  |
	| Z  |      | 0.0       0.066    1.111 | | B  |
     	--  --      ---	      		    ---- --  --

RGB to CMY

	__  __      __            	          __  __  __
        | C  |      |-1.0	0.0	0.0 	0.0 | | R  |
	| M  |	 =  | 0.0      -1.0	0.0	0.0 | | G  |
	| Y  |      | 0.0	0.0    -1.0	0.0 | | B  |
	|    |      | 1.0       1.0     1.0    	1.0 | | 1.0|	
     	--  --      ---			         ---- --  --

CMY to RGB

	__  __      __            	          __  __  __
        | R  |      |-1.0	0.0	0.0 	0.0 | | C  |
	| G  |	 =  | 0.0      -1.0	0.0	0.0 | | M  |
	| B  |      | 0.0	0.0    -1.0	0.0 | | Y  |
	|    |      | 1.0       1.0     1.0    	1.0 | | 1.0|	
     	--  --      ---			         ---- --  --

RGB to HSV(or HLS)

The coversion between RGB an HSV or HLS and back is not as simple as a matrix operations. Below are links to psuedo code algorithms for these conversions

RGB to HSV

HSV to RGB

RGB to HLS

HLS to RGB

Execute a program to convert between several color models

Return to Color Space Index