Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e392d03

Browse files
committed
MNT: normalize to use un-spaced names in XKCD map
1 parent 010be02 commit e392d03

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/matplotlib/_color_data.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,12 @@
961961
'green': '#15b01a',
962962
'purple': '#7e1e9c'}
963963

964+
# normalize to names with no spaces
965+
for k in list(XKCD_COLORS):
966+
_k = k.replace(' ', '')
967+
if _k != k:
968+
XKCD_COLORS[_k] = XKCD_COLORS[k]
969+
964970

965971
# https://drafts.csswg.org/css-color-4/#named-colors
966972
CSS4_COLORS = {

0 commit comments

Comments
 (0)