Python Colorsys Module
Color system conversions — rgb_to_hls, hls_to_rgb, rgb_to_hsv, hsv_to_rgb. This category documents 5 Python colorsys module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: colorsys.rgb_to_hls(), colorsys.hls_to_rgb(), colorsys.rgb_to_hsv(), colorsys.hsv_to_rgb(), colorsys.rgb_to_yiq(). colorsys.rgb_to_hls() converts RGB color values (0-1) to HLS (hue, lightness, saturation). colorsys.hls_to_rgb() converts HLS color values back to RGB. colorsys.rgb_to_hsv() converts RGB to HSV (hue, saturation, value). colorsys.hsv_to_rgb() converts HSV back to RGB. colorsys.rgb_to_yiq() converts RGB to YIQ (used in NTSC TV). Colorsys Module belongs to the Math & Stats group alongside Math Module, Statistics Module, Random Module, Decimal Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground. Python Reference documents 978+ functions, methods, and modules across 114 categories of the standard library, and every entry in this Colorsys Module category follows the same format — syntax first, then what it does, the parameters it accepts, what it returns, and a working code example — so once you have read one page you can read them all.