Cookies info

This website uses Google cookies to analyse traffic. Information about your use of our site is shared with Google for that purpose. See details.


Colors [3.4]

Colors in OpenVG other than those stored in image pixels are represented as non-premultiplied sRGBA color values. Color and alpha values lie in the range [0, 1] unless otherwise noted.

Linear color space [3.4.2]

The linear lRGB color space is defined in terms of the standard CIE XYZ color space, following ITU Rec. 709 using a D65 white point:



sRGB color space [3.4.2]

The sRGB color space defines values Rs, Gs, Bs in terms of the linear lRGB primaries by applying a gamma γ mapping.



lRGB to sRGB conversion:



sRGB to lRGB conversion:



Linear grayscale

The linear grayscale (luminance) color space is related to the linear lRGB color space by the equations:



The perceptually-uniform grayscale color space is related to the linear grayscale (luminance) color space by the gamma γ mapping:



Conversion from perceptually-uniform grayscale to sRGB is performed by replication:



Color space conversions

The following table summarizes the steps needed to convert one color space into another. The source format is in the left column, and the destination format is in the top row. The numbers indicate the equations from this section that are to be applied, in left-to-right order:

lRGB-133, 5
sRGB2-2, 32, 3, 5
lLUM44, 1-5
sLUM7, 276-