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

Some color names are missing #277

Closed
kimikage opened this issue Mar 4, 2017 · 4 comments
Closed

Some color names are missing #277

kimikage opened this issue Mar 4, 2017 · 4 comments

Comments

@kimikage
Copy link
Collaborator

kimikage commented Mar 4, 2017

The following parsing of colors fails because color_names is missing some color names in
SVG color keywords.

colorant"aqua"   # "aqua"   => (  0, 255, 255),
colorant"indigo" # "indigo" => ( 75,   0, 130),
colorant"lime"   # "lime"   => (  0, 255,   0),
colorant"teal"   # "teal"   => (  0, 128, 128),
@oxinabox
Copy link
Member

oxinabox commented Mar 4, 2017

Confirmed (on 0.7.3, and on master)

As a work around:
if you use NamedColors.jl
They will parse.
NamedColors adds a fallback on colorant to its own much more extensive colors lists

Though I think the definition of Indigo disagrees.
This maybe because the there are multiple conflicting definitions for indigo.

julia> using NamedColors
julia> colorant"aqua"
RGB24{N0f8}(0.0,1.0,1.0)

julia> colorant"indigo"
RGB24{N0f8}(0.22,0.008,0.51)

julia> colorant"lime"
RGB24{N0f8}(0.0,1.0,0.0)

julia> colorant"teal"
RGB24{N0f8}(0.0,0.502,0.502)

@kimikage
Copy link
Collaborator Author

kimikage commented Mar 9, 2017

Thank you for your confirmation.

The result of indigo in NamedColors.jl seems to be from the XKCD color survey.

As colorant"red" is parsed as RGB{N0f8}(1.0,0.0,0.0), which disagrees with the XKCD's one, there is, I think, little reason to prefer the XKCD's definition.

@oxinabox
Copy link
Member

NamedColors.jl always prefers Color.jl's definitions in preference to all others, no mater what you do.
After that point there is a configurable list of precedence for the various color dictionaries.
On which XKCD is supposed to be by default near the bottom.
I'll have to check that is working right: JuliaGraphics/NamedColors.jl#8
thanks

timholy added a commit that referenced this issue Mar 10, 2017
@timholy
Copy link
Member

timholy commented Mar 10, 2017

Fixed by #279

@timholy timholy closed this as completed Mar 10, 2017
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

3 participants