Welcome

Guest

Log out

Subscription valid until 2014-11-24



















 

Color conversion math and formulas

These are the formulas used by our Color Calculator.
Each conversion formula is written as a "neutral programming function", easy to be translate in any specific computer language.
If you are searching for more generic information about color, on the Net there are several good sites devoted to color science, physics, psychology, physiology and technology.
Check our Links page or our FAQ page for a list of handy color references.

XYZ —> RGB

RGB —> XYZ

XYZ —> Yxy

Yxy —> XYZ

XYZ —> Hunter-Lab

Hunter-Lab —> XYZ

XYZ —> CIE-L*ab

CIE-L*ab —> XYZ

CIE-L*ab —> CIE-L*CH°

var_H = arc_tangent( CIE-b*, CIE-a* )  //Quadrant by signs

if ( var_H > 0 ) var_H = ( var_H / PI ) * 180
else             var_H = 360 - ( abs( var_H ) / PI ) * 180

CIE-L* = CIE-L*
CIE-C* = sqrt( CIE-a* ^ 2 + CIE-b* ^ 2 )
CIE-H° = var_H

Top

CIE-L*CH° —>CIE-L*ab

XYZ —> CIE-L*uv

CIE-L*uv —> XYZ

RGB —> HSL

HSL —> RGB

RGB —> HSV

HSV —> RGB

Range of HSL, HSB and HSV in popular applications

RGB —> CMY

CMY —> RGB

CMY —> CMYK

CMYK —> CMY

XYZ (Tristimulus) Reference values of a perfect reflecting diffuser