You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Absolutely love this library. I'm using it to auto generate tones for a color palette from a starting color using lch format. I'm running into issues with the fact that, say, adding 5 to the lightness of a color and then subtracting 5 does not produce the original color (I assume because of the way colord transitions through rgba). I'm wondering if there are currently any workarounds you can think of?
Hi! Absolutely love this library. I'm using it to auto generate tones for a color palette from a starting color using
lch
format. I'm running into issues with the fact that, say, adding5
to the lightness of a color and then subtracting5
does not produce the original color (I assume because of the waycolord
transitions throughrgba
). I'm wondering if there are currently any workarounds you can think of?My general approach looks like this:
Where
shadeIndices
is an array of integers representing tones like[-2, -1, 0, 1, 2]
. Andlch
is the rest of thelch
object, doesn't includel
andc
.Then, I provide an option to shift the starting lightness up or down.
The text was updated successfully, but these errors were encountered: