Data Modeling and Utility Modules
colorsys
Converts between RGB, HSV, HLS and YIQ color coordinates. RGB, HSV and HLS components generally use normalized values from zero to one; YIQ chrominance components can be negative. Conversion is mathematical and does not apply display profiles or gamma corrections.
Formal Syntax & Structure
python syntaxpython
import colorsysReturn Value
module
Module namespace available through import; import is a statement, not a value-returning expression.
Working Example
Example Snippetpython
from colorsys import rgb_to_hsvprint(rgb_to_hsv(1.0, 0.0, 0.0))