Color Models



A brief overview of the main color models with interactive visualization.

Input image


RGB color model


Color model based on the cartesian coordinates, where each primary color is represented by an axis.

XYZ color model


$$ \large \left[ \begin{array}{c} X\\Y\\Z \end{array} \right] = \left[ \begin{array}{ccc} 0.490 & 0.310 & 0.200\\ 0.177 & 0.813 & 0.010\\ 0.000 & 0.010 & 0.990 \end{array} \right] \left[ \begin{array}{c} R\\G\\B \end{array} \right] $$

YIQ color model


$$ \large \left[ \begin{array}{c} Y\\I\\Q \end{array} \right] = \left[ \begin{array}{ccc} 0.299 & 0.587 & 0.114\\ 0.596 & -0.275 & -0.321\\ 0.212 & -0.523 & 0.331 \end{array} \right] \left[ \begin{array}{c} R\\G\\B \end{array} \right] $$

YUV color model


$$ \large \left[ \begin{array}{c} Y\\U\\V \end{array} \right] = \left[ \begin{array}{ccc} 0.299 & 0.587 & 0.114\\ -0.147 & -0.289 & 0.436\\ 0.615 & -0.515 & -0.100 \end{array} \right] \left[ \begin{array}{c} R\\G\\B \end{array} \right] $$

$YC_BC_R$ color model


$$ \large \left[ \begin{array}{c} Y\\C_B\\C_R \end{array} \right] = \left[ \begin{array}{ccc} 0.299 & 0.587 & 0.114\\ -0.169 & -0.331 & 0.500\\ 0.500 & -0.419 & -0.081 \end{array} \right] \left[ \begin{array}{c} R\\G\\B \end{array} \right] $$

HSV color model


$$ \large H = \begin{cases} 60\frac{G-B}{M-m} & \text{, if $M = R$} \\ 60\frac{B-R}{M-m}+120 & \text{, if $M = G$} \\ 60\frac{R-G}{M-m}+240 & \text{, if $M = B$} \end{cases} \quad;\quad S = \begin{cases} \frac{M-m}{M} & \text{, if $M \neq 0$} \\ 0 & \text{, otherwise} \end{cases} \quad;\quad V = M $$

HSL color model


$$ \large H = \begin{cases} 60\frac{G-B}{M-m} & \text{, if $M = R$} \\ 60\frac{B-R}{M-m}+120 & \text{, if $M = G$} \\ 60\frac{R-G}{M-m}+240 & \text{, if $M = B$} \end{cases} \quad;\quad S = \begin{cases} 0 & \text{, if M=m} \\ \frac{M-m}{M+m} & \text{, if $0 < L \leq 0.5$} \\ \frac{M-m}{2-(M+m)} & \text{, $L > 0.5$} \end{cases} \quad;\quad L = \frac{M+m}{2} $$