On this page
  1. colorsys.rgb_to_hsv
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

colorsys.rgb_to_hsv

Prev: colorsys.rgb_to_hls | Up: colorsys | Next: colorsys.rgb_to_yiq
Rel: colorsys.hls_to_rgb, colorsys.hsv_to_rgb, colorsys.rgb_to_hls, colorsys.rgb_to_yiq
Ref: docs.python.org — colorsys.rgb_to_hsv
Tags: #public #python3 #stdlib #colorsys


Import

import colorsys
from colorsys import rgb_to_hsv

Signature & Overview

colorsys.rgb_to_hsv(r, g, b)

colorsys.rgb_to_hsv() function.

Usage

import colorsys

h, s, v = colorsys.rgb_to_hsv(0.0, 1.0, 0.0)
assert (round(h, 2), round(s, 2), round(v, 2)) == (0.33, 1.0, 1.0)

Gotchas

REPL Inspect

from colorsys import rgb_to_hsv
help(rgb_to_hsv)

Linked from

Related notes