-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HSL-variable interpolation outputs an imprecise color #3383
Labels
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
matthew-dean
added
feature request
low priority
bug
and removed
stale
feature request
labels
Aug 5, 2019
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey!
LESS version 3.8.1 introduced outputting HSL color values as authored instead of their HEX counterparts (e.g.
hsl(0, 0%, 76%)
outputshsl(0, 0%, 76%)
instead of#c2c2c2
now), which is a really cool feature. However, using HSL colors with variable interpolation sometimes (depending on the color parameters) outputs the color slightly imprecisely (and very ugly):(v3.8.1 )
expected result:
actual result:
This happens with and without the tilde, obviously.
I'm using two different colors here to demonstrate that not every value is outputted like this, e.g.
hsl(0, 8%, 17%)
is completely fine - notice here that the values are dependent of the others (with 17% lightness, the 8% saturation is suddenly fine).However, not using variable interpolation works as expected:
result:
I have also tried with HSV and RGB, but those ones are still being converted into their HEX counterparts, which is why I'm not sure whether the sudden HSL preservation is a feature.
This is tested using lessc on Windows 10.
A reason I can think of is that it's maybe caused by converting the HSL values into HEX and then back into HSL again, but what do I know.
I would expand the example a bit but the less playground is apparently not yet updated to 3.8.1 .
Hallo89
The text was updated successfully, but these errors were encountered: