Ngl.rgbyiq
Converts from the RGB color space to YIQ.
Prototype
y, i, q = Ngl.rgbyiq(r, g, b)
Arguments
r, g, bIntensity values for red, green, blue in the range [0.1.].
Return values
yY component (luminance) values in the range [0.,1.].
iI component (chrominance orange-blue) values in the range [-0.6, 0.6].
qQ component (chrominance purple-green) values in the range [-0.52, 0.52].
Description
This function converts from the RGB (Red, Green, Blue) color space to YIQ (the TV standard). In the YIQ color space the Y (luminance) component is the only component transmitted to black and white TVs; the I (in-phase, or orange-blue) and Q (quadrature, or purple-green) components carry the color, or chrominance, information.
The conversion equations are:
Y = 0.299000R + 0.587000G + 0.114000B I = 0.595716R - 0.274453G - 0.321263B Q = 0.211456R - 0.522591G + 0.311135B
See Also
Ngl.yiqrgb, Ngl.hlsrgb, Ngl.hsvrgb, Ngl.rgbhls, Ngl.rgbhsv
Examples
See color3.py.