chroma.js
chroma.js copied to clipboard
Initializing color in gl space without alpha gives unexpected results
Observations:
- No alpha value for
glseems to be fine:chroma(0.5, 0.5, 0.8, "gl")=#8080cc(expected) - Until you use this object:
chroma(0.5, 0.5, 0.8, "gl").brighten(1)=1(unexpected) - Adding an alpha value helps:
chroma(0.5, 0.5, 0.8, 1, "gl").brighten(1)=#b1afff(expected)