color-tools
Installation
SKILL.md
Color Tools
Compute color math; don't eyeball hex values.
HEX ↔ RGB ↔ HSL
python3 - <<'PY'
import colorsys
def hex_to_rgb(h): h=h.lstrip('#'); return tuple(int(h[i:i+2],16) for i in (0,2,4))
def rgb_to_hex(r,g,b): return '#%02x%02x%02x'%(r,g,b)
r,g,b = hex_to_rgb('#3b82f6')
h,l,s = colorsys.rgb_to_hls(r/255,g/255,b/255)
print('rgb', (r,g,b))
print('hsl', (round(h*360), round(s*100), round(l*100)))
print('hex', rgb_to_hex(r,g,b))
PY