Skip to content
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 in sRGB space #66

Closed
clarfonthey opened this issue Nov 15, 2016 · 2 comments · Fixed by #60
Closed

HSL in sRGB space #66

clarfonthey opened this issue Nov 15, 2016 · 2 comments · Fixed by #60
Milestone

Comments

@clarfonthey
Copy link

I may be reading things wrong in the specs, but I believe that the version of HSL that CSS supports is in fact HSL in sRGB space, not linear HSL.

It'd be nice if we had an option to store this type of HSL without hackishly converting an Hsl to an Rgb and then copying the components from the Rgb into an Srgb. Again, if I'm wrong and this is actually linear Hsl, feel free to ignore this use case.

@Ogeon
Copy link
Owner

Ogeon commented Nov 15, 2016

Yes, this was something we noticed and was about to change. See #60, where I started implementing support for multiple RGB standards. I haven't checked in what state it is, yet, but it's possible that it can be patched up and merged within a reasonable time... I'll check the comments and see what we got stuck on.

@Ogeon
Copy link
Owner

Ogeon commented Nov 15, 2016

Hmm. It may have been a difference in our understanding of color primaries, which may mean that the code itself is OK (unless that part is wrong). I'll see if I can look at it tomorrow, and see how complete it is.

@Ogeon Ogeon added this to the 0.3.0 milestone Aug 8, 2017
bors bot added a commit that referenced this issue Feb 17, 2018
60: [WIP] Generalize the RGB types over RGB standards r=Ogeon a=Ogeon

This changes the `Rgb` type to have a type parameter that implements the `RgbStandard` trait. This trait defines a set of primaries, white point and transfer function. It does also make the RGB types more uniform and type safe.

Closes #66, closes #31, closes #58
@bors bors bot closed this as completed in #60 Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants