Skip to content

Commit c3bb690

Browse files
committed
color simplification
1 parent a062aad commit c3bb690

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

src/tikzplotlib/_color.py

+15-18
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,22 @@
44

55
# RGB values (as taken from xcolor.dtx):
66
builtin_colors = {
7-
# List white first such that for gray values, the combination
8-
# white!<x>!black is preferred over, e.g., gray!<y>!black. Note that
9-
# the order of the dictionary is respected from Python 3.6 on.
10-
"white": np.array([1, 1, 1]),
11-
"lightgray": np.array([0.75, 0.75, 0.75]),
12-
"gray": np.array([0.5, 0.5, 0.5]),
13-
"darkgray": np.array([0.25, 0.25, 0.25]),
14-
"black": np.array([0, 0, 0]),
7+
"white": [1, 1, 1],
8+
"lightgray": [0.75, 0.75, 0.75],
9+
"gray": [0.5, 0.5, 0.5],
10+
"darkgray": [0.25, 0.25, 0.25],
11+
"black": [0, 0, 0],
1512
#
16-
"red": np.array([1, 0, 0]),
17-
"green": np.array([0, 1, 0]),
18-
"blue": np.array([0, 0, 1]),
19-
"brown": np.array([0.75, 0.5, 0.25]),
20-
"lime": np.array([0.75, 1, 0]),
21-
"orange": np.array([1, 0.5, 0]),
22-
"pink": np.array([1, 0.75, 0.75]),
23-
"purple": np.array([0.75, 0, 0.25]),
24-
"teal": np.array([0, 0.5, 0.5]),
25-
"violet": np.array([0.5, 0, 0.5]),
13+
"red": [1, 0, 0],
14+
"green": [0, 1, 0],
15+
"blue": [0, 0, 1],
16+
"brown": [0.75, 0.5, 0.25],
17+
"lime": [0.75, 1, 0],
18+
"orange": [1, 0.5, 0],
19+
"pink": [1, 0.75, 0.75],
20+
"purple": [0.75, 0, 0.25],
21+
"teal": [0, 0.5, 0.5],
22+
"violet": [0.5, 0, 0.5],
2623
# The colors cyan, magenta, yellow, and olive are also
2724
# predefined by xcolor, but their RGB approximation of the
2825
# native CMYK values is not very good. Don't use them here.

0 commit comments

Comments
 (0)