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

colorsys.hls_to_rgb

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


Import

import colorsys
from colorsys import hls_to_rgb

Signature & Overview

colorsys.hls_to_rgb(h, l, s)

colorsys.hls_to_rgb() function.

Usage

import colorsys

r, g, b = colorsys.hls_to_rgb(0.0, 0.5, 1.0)
assert (round(r, 2), round(g, 2), round(b, 2)) == (1.0, 0.0, 0.0)

Gotchas

REPL Inspect

from colorsys import hls_to_rgb
help(hls_to_rgb)

Linked from

Related notes