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

Named colors #5

Closed
Ogeon opened this issue Dec 15, 2015 · 2 comments · Fixed by #34
Closed

Named colors #5

Ogeon opened this issue Dec 15, 2015 · 2 comments · Fixed by #34
Milestone

Comments

@Ogeon
Copy link
Owner

Ogeon commented Dec 15, 2015

A collection of named color constants (i.e. the named CSS and HTML colors) may be good to have. It should be possible to choose what kind of gamma correction they are assumed have when converting them to a linear RGB value.

@Ogeon
Copy link
Owner Author

Ogeon commented Jan 19, 2016

I think this has to wait for #7, since the named colors will be defined as RGB.

@Ogeon Ogeon added this to the 0.2.1 milestone Jan 29, 2016
@Ogeon
Copy link
Owner Author

Ogeon commented Jan 30, 2016

It may be a good idea to place this behind an optional feature. I'm not sure it it should be enabled by default or not, though.

@homu homu closed this as completed in #34 Feb 3, 2016
homu added a commit that referenced this issue Feb 3, 2016
Add color constants

This adds the SVG1.1/CSS3 keyword colors as constants, and a function which maps name strings to them. They are accessible through the `named` module and the documentation shows colored preview rectangles as descriptions. There are even more named colors out there (https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F, for example), but this is a good start.

The whole `named` module can be toggled with the `"named"` feature, and the `named::from_str` function can be toggled with `"named_from_str"`.

This closes #5.
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.

1 participant