Email or username:

Password:

Forgot your password?
Adam Argyle

#CSS color

what's the difference between adjusting lightness, adding white, and adding black?

feel it out, here in this Codepen

column
1: from color to 100% lightness
2: from color to white
3. from color to black
4. from color to 0% lightness

codepen.io/argyleink/pen/GgKWJ

2 comments
Oddbjørn Øvernes

@argyleink The mix-solution gets rid of chroma "for free", but you don't control the curve! Relatedly, I wish you could do stuff like `calc(sin(l * pi) * c)` in rcs, but this crashes the browser😅. However it works fine if "l" is replaced with an external var(--l) 🤷
(example: codepen.io/Oddbj-rn-vernes/pen )

Adam Argyle

@oddvernes > The mix-solution gets rid of chroma "for free", but you don't control the curve!

exactly!

> crashes the browser

i'll log a bug!

Go Up