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
Use xkcd: prefix to avoid color name clashes. #6390
Conversation
Otherwise, merging CSS4_COLORS and XKCD_COLORS becomes order-dependent. It's also unclear why space-less names are needed, but I can put them back if someone feels strongly about it...
|
||
All string specifications of color are case-insensitive. | ||
|
||
Internally, mpl is moving to storing all colors as RGBA float quadruples. | ||
|
||
Name clash between CSS4/X11 and XKCD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave this plot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we are explicitly name-spacing the colors, I think this chart is still interesting to include in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you OK for explicitly namespacing everything then? It'll always be easier to add un-namespaced versions later than removing them...
I am still in favor of leaving both the prefixed and un-prefixed versions. For names that are only in the xkcd name space there is no reason to include the extra 5 characters. We should also document the names as |
I can change the prefix to XKCD, no problem there. |
One of the things we decided in the discussion on the pr where the XKCD On Mon, May 9, 2016, 16:10 Antony Lee notifications@github.com wrote:
|
Then the "base" namespace could cover both the one-letter codes and the CSS4 names? |
I am hesitant to combine the single letter colors (which are home grown) The other concern is that we can not encode the single letter colors as hex On Mon, May 9, 2016 at 4:37 PM Antony Lee notifications@github.com wrote:
|
TBH I don't feel strongly about anything here, except that having a name clash by default looks... unappetizing. A namespacing/priority mechanism (say, "base", "css4", "xkcd", "seaborn-<...>") would not, by default, change the meaning of the CSS colors (but it would be possible for the user the change them -- in a more "ordered" manner than seaborn currently changes the base colors. |
By the way, regarding xkcd vs XKCD: http://xkcd.com/about/
|
huh, fair enough re xkcd. Could have sworn I read the opposite.... |
@@ -563,7 +563,7 @@ def test_xkcd(): | |||
mcolors.colorConverter.to_rgb('blue')) | |||
assert x11_blue == '#0000ff' | |||
XKCD_blue = mcolors.rgb2hex( | |||
mcolors.colorConverter.to_rgb('XKCDblue')) | |||
mcolors.colorConverter.to_rgb('xkcd:blue')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does read much better.
I am also 👍 on this modulo a few comments. |
I have no idea what's wrong with this build... |
j = 0 | ||
|
||
for n in sorted(overlap, reverse=True): | ||
for j, n in enumerate(sorted(overlap, reverse=True)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means you can also drop the j += 1
below.
aa9822a
to
30ffa63
Compare
I like the use of 'xkcd:' as a prefix for all xkcd colors. |
I completely missed that there is both 'dark blue' and 'darkblue'. The downsides of machine learning + crowd sourcing.... |
Here's the offenders:
Anyways, I guess this answers the question... |
I will fix that figure my self in a follow on PR |
API: Use xkcd: prefix to avoid color name clashes.
backported to 2.x as c2b6769 |
Split out of #6382.
Without the prefix, merging CSS4_COLORS and XKCD_COLORS becomes order-dependent.
It's also unclear why space-less names are needed, but I can put them back if someone feels strongly about it...