MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / hue_to_rgb

Function hue_to_rgb

PySimpleGUI/PySimpleGUI.py:20184–20193  ·  view source on GitHub ↗
(p, q, t)

Source from the content-addressed store, hash-verified

20182
20183def _hsl_to_rgb(h, s, l):
20184 def hue_to_rgb(p, q, t):
20185 t += 1 if t < 0 else 0
20186 t -= 1 if t > 1 else 0
20187 if t < 1 / 6:
20188 return p + (q - p) * 6 * t
20189 if t < 1 / 2:
20190 return q
20191 if t < 2 / 3:
20192 p + (q - p) * (2 / 3 - t) * 6
20193 return p
20194
20195 if s == 0:
20196 r, g, b = l, l, l

Callers 1

_hsl_to_rgbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected