chroma.js icon indicating copy to clipboard operation
chroma.js copied to clipboard

Initializing color in gl space without alpha gives unexpected results

Open pohlt opened this issue 3 years ago • 0 comments

Observations:

  • No alpha value for gl seems 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)

pohlt avatar Aug 06 '22 06:08 pohlt