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
This is a really great library, which helped me stick to clojure all the way, even with CSS styling. I even find the color utility functions very neat and useful. They helped me a lot in my recent work. But then, I got surprised suddenly when I switched from version 1.3.3 to 1.3.4 when the colors suddenly were different from what I had planned earlier. Not sure what is the general understanding of scaling. However, the behavior of garden.color/scale-lightness was more appropriate in version 1.3.3, rather than in 1.3.4. Or may be it is me only. My understanding is like if you lighten any color with 100%, it goes to 100% lightness, that is white. And if you lighten -100% it would become black. Then any other number between -100 to 100 would be a color in between. And this was the behavior in 1.3.3.
This actually helps in easily creating lighter shades from a base color. Just take 10, 20, 30, 40 .. 90 percent lighter. And it perfectly matches the use case.
I would like if the old behavior can be restored or retained as another function with a different name. For now I have written my own lighten function by copying the older code to my project, but I believe it's right place is in garden.color
Thank you again for this wonderful library.
The text was updated successfully, but these errors were encountered:
@paroda Thank you for the kind words. The scaling functions were changed in the patch accompanying this pull request. It seems like folks (including myself) found that to be the correct behavior, however, I can understand a different point of view. After all, I wrote the original behavior! Perhaps there's a concept here and we're just not naming it appropriately?
Hi,
This is a really great library, which helped me stick to clojure all the way, even with CSS styling. I even find the color utility functions very neat and useful. They helped me a lot in my recent work. But then, I got surprised suddenly when I switched from version 1.3.3 to 1.3.4 when the colors suddenly were different from what I had planned earlier. Not sure what is the general understanding of scaling. However, the behavior of garden.color/scale-lightness was more appropriate in version 1.3.3, rather than in 1.3.4. Or may be it is me only. My understanding is like if you lighten any color with 100%, it goes to 100% lightness, that is white. And if you lighten -100% it would become black. Then any other number between -100 to 100 would be a color in between. And this was the behavior in 1.3.3.
(scale-lightness (hsl 50 50 80) 50) => (hsl 50 50 90) ;; NOT (hsl 50 50 100) !
(scale-lightness (hsl 50 50 80) 75) => (hsl 50 50 95)
(scale-lightness (hsl 50 50 80) 100) => (hsl 50 50 100)
This actually helps in easily creating lighter shades from a base color. Just take 10, 20, 30, 40 .. 90 percent lighter. And it perfectly matches the use case.
I would like if the old behavior can be restored or retained as another function with a different name. For now I have written my own lighten function by copying the older code to my project, but I believe it's right place is in garden.color
Thank you again for this wonderful library.
The text was updated successfully, but these errors were encountered: