Replies: 1 comment 2 replies
-
I'm fairly sure HSL is already supported on main |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Would be neat if typst supported a HSL color function (in addition to rgb).
HSL is easier to work with, since oftentimes a developer wants to make a color "lighter" or "darker", and doing that with rgb is more work. With HSL it's just a change to one parameter.
Converting from HSL to RGB is easy:
https://docs.rs/colors-transform/latest/colors_transform/
There might also be arguments for introducing support for additional color spaces, but since "sRGB" is already supported (it's used for RGB), adding support for hsl (and potentially also hwb) isn't much work.
Beta Was this translation helpful? Give feedback.
All reactions