n | |
| :mod:`colorsys` --- Conversions between color systems |
| ===================================================== |
| |
| .. module:: colorsys |
| :synopsis: Conversion functions between RGB and other color systems. |
| .. sectionauthor:: David Ascher <da@python.net> |
| |
| |
| The :mod:`colorsys` module defines bidirectional conversions of color values |
| between colors expressed in the RGB (Red Green Blue) color space used in |
| computer monitors and three other coordinate systems: YIQ, HLS (Hue Lightness |
| Saturation) and HSV (Hue Saturation Value). Coordinates in all of these color |
| spaces are floating point values. In the YIQ space, the Y coordinate is between |
| 0 and 1, but the I and Q coordinates can be positive or negative. In all other |
| spaces, the coordinates are all between 0 and 1. |
| |
n | .. seealso:: |
| |
| More information about color spaces can be found at |
| More information about color spaces can be found at |
| `<http://www.poynton.com/ColorFAQ.html>`_. |
| http://www.poynton.com/ColorFAQ.html and |
| http://www.cambridgeincolour.com/tutorials/color-spaces.htm. |
| |
| The :mod:`colorsys` module defines the following functions: |
| |
| |
| .. function:: rgb_to_yiq(r, g, b) |
| |
| Convert the color from RGB coordinates to YIQ coordinates. |
| |