Python
docs.python.org › 3 › library › colorsys.html
colorsys — Conversions between color systems
>>> import colorsys >>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4) (0.5, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4) (0.2, 0.4, 0.4) ... © Copyright 2001 Python Software Foundation. This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
Author: Fredrik Lundh
Published: 2001
Pages: 304
TutorialsPoint
tutorialspoint.com › colorsys-module-in-python
colorsys module in Python
import colorsys # Original color (red) r, g, b = 1.0, 0.0, 0.0 # Convert to HSV to modify brightness h, s, v = colorsys.rgb_to_hsv(r, g, b) print(f"Original HSV: H={h:.2f}, S={s:.2f}, V={v:.2f}") # Make it 50% darker darker_v = v * 0.5 darker_rgb ...
W3Schools
w3schools.com › python › ref_module_colorsys.asp
Python colorsys Module
Python Examples Python Compiler ... Interview Q&A Python Training ... import colorsys h, s, v = colorsys.rgb_to_hsv(0.5, 0.25, 0.75) print(round(h, 3), round(s, 3), round(v, 3)) Try it Yourself »...
7-Zip Documentation
documentation.help › python 3.7.3 › colorsys — conversions between color systems
colorsys — Conversions between color systems | Python 3.7.3 Documen…
Example: >>> import colorsys >>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4) (0.5, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4) (0.2, 0.4, 0.4) index · modules | next | previous | Python » · 3.7.3 Documentation » · The Python Standard Library » · Multimedia Services » ·
Python
docs.python.org › 3.9 › library › colorsys.html
colorsys — Conversions between color systems — Python 3.9.25 documentation
>>> import colorsys >>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4) (0.5, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4) (0.2, 0.4, 0.4) ... © Copyright 2001-2026, Python Software Foundation. This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
7-Zip Documentation
documentation.help › python 3.4.4 › 22.6. colorsys — conversions between color systems
22.6. colorsys — Conversions between color systems | Python 3.4.4 D…
December 20, 2015 - Example: >>> import colorsys >>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4) (0.5, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4) (0.2, 0.4, 0.4) index · modules | next | previous | Python » · 3.4.4 Documentation » · The Python Standard Library » · 22. Multimedia Services » ·
W3cubDocs
docs.w3cub.com › python~3.14 › library › colorsys
Colorsys - Python 3.14 - W3cubDocs
Example: >>> import colorsys >>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4) (0.5, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4) (0.2, 0.4, 0.4) © 2001–2025 Python Software Foundation Licensed under the PSF License.
Docs4dev
docs4dev.com › docs › en › python › 3.7.2rc1 › all › library-colorsys.html
Python
July 3, 2021 - The colorsys module defines the following functions: ... Convert the color from RGB coordinates to YIQ coordinates. ... Convert the color from YIQ coordinates to RGB coordinates. ... Convert the color from RGB coordinates to HLS coordinates. ... Convert the color from HLS coordinates to RGB coordinates. ... Convert the color from RGB coordinates to HSV coordinates. ... Convert the color from HSV coordinates to RGB coordinates. ... >>> import colorsys >>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4) (0.5, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4) (0.2, 0.4, 0.4)
Iditect
iditect.com › programming › python-example › colorsys-module-in-python-with-examples.html
colorsys module in Python with examples - iDiTect
Here's how you can use the colorsys module with examples for each type of conversion: import colorsys # Define RGB colors r, g, b = 255, 0, 0 # Red color # Normalize the RGB values to [0, 1] because colorsys uses this scale r, g, b = [x / 255.0 for x in (r, g, b)] # Convert RGB to HSV; h, s, ...
7-Zip Documentation
documentation.help › IronPython › colorsys.html
21.7. colorsys — Conversions between color systems - IronPython Documentation
Example: >>> import colorsys >>> colorsys.rgb_to_hsv(.3, .4, .2) (0.25, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.25, 0.5, 0.4) (0.3, 0.4, 0.2) index · modules | next | previous | IronPython v2.7.4a1 documentation » · The Python Standard Library » · 21. Multimedia Services » ·
7-Zip Documentation
documentation.help › Python-2.7 › colorsys.html
21.7. colorsys — Conversions between color systems - Python 2.7 Documentation
July 4, 2010 - Example: >>> import colorsys >>> colorsys.rgb_to_hsv(.3, .4, .2) (0.25, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.25, 0.5, 0.4) (0.3, 0.4, 0.2) index · modules | next | previous | Python v2.7 documentation » · The Python Standard Library » · 21. Multimedia Services » ·
7-Zip Documentation
documentation.help › Python-3.5 › colorsys.html
22.6. colorsys — Conversions between color systems - Python 3.5 Documentation
September 6, 2015 - Example: >>> import colorsys >>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4) (0.5, 0.5, 0.4) >>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4) (0.2, 0.4, 0.4) index · modules | next | previous | Python » · 3.5.0rc3 Documentation » · The Python Standard Library » · 22. Multimedia Services » ·