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

Generalization of color space used in rendering #66

Closed
haasn opened this issue Nov 18, 2012 · 0 comments
Closed

Generalization of color space used in rendering #66

haasn opened this issue Nov 18, 2012 · 0 comments

Comments

@haasn
Copy link
Member

haasn commented Nov 18, 2012

Instead of the Color instance itself being in charge of the color space to render it to, this would ideally be the backend's job.

Otherwise, inconsistent Color instances could result in an inconsistent diagram, since the user may want to use color spaces other than sRGB.

The proposed solution would be to either parametrize toRGBA over the RGBSpace to use; or ideally, don't provide toRGBA at all and simply provide toColour :: a -> Colour Double and toAlpha :: a -> Double.

haasn pushed a commit to haasn/diagrams-lib that referenced this issue Nov 20, 2012
This addresses concerns raised in issue diagrams#66 by letting the backend
choose which color space to render Color instances to. Functions are
provided for backwards compatibility with the old semantics, which were
to always render out to companded sRGB space.
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

No branches or pull requests

2 participants