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

Add color constants #34

Merged
merged 3 commits into from
Feb 3, 2016
Merged

Add color constants #34

merged 3 commits into from
Feb 3, 2016

Conversation

Ogeon
Copy link
Owner

@Ogeon Ogeon commented Feb 1, 2016

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.

@Ogeon
Copy link
Owner Author

Ogeon commented Feb 1, 2016

I'm considering adding a &str -> color function. It could certainly be useful, but it would be big.

@Ogeon
Copy link
Owner Author

Ogeon commented Feb 3, 2016

That'll be all, this time.

@homu r+

@homu
Copy link
Contributor

homu commented Feb 3, 2016

📌 Commit a401917 has been approved by Ogeon

@homu
Copy link
Contributor

homu commented Feb 3, 2016

⚡ Test exempted - status

@homu homu merged commit a401917 into master Feb 3, 2016
homu added a commit that referenced this pull request 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.
@Ogeon Ogeon deleted the named branch February 3, 2016 13:42
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 this pull request may close these issues.

Named colors
2 participants