8000 TST: add smoke test for the color blue · bearstrong/matplotlib@fde356b · GitHub
[go: up one dir, main page]

Skip to content

Commit fde356b

Browse files
tacaswellbearstrong
authored andcommitted
TST: add smoke test for the color blue
1 parent 13b1a1c commit fde356b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/tests/test_colors.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,15 @@ def angled_plane(azimuth, elevation, angle, x, y):
555555
assert_array_almost_equal(h, np.cos(np.radians(angle)))
556556

557557

558+
def test_xkcd():
559+
x11_blue = mcolors.rgb2hex(
560+
mcolors.colorConverter.to_rgb('blue'))
561+
assert x11_blue == '#0000ff'
562+
XKCD_blue = mcolors.rgb2hex(
563+
mcolors.colorConverter.to_rgb('XKCDblue'))
564+
assert XKCD_blue == '#0343df'
565+
566+
558567
def _sph2cart(theta, phi):
559568
x = np.cos(theta) * np.sin(phi)
560569
y = np.sin(theta) * np.sin(phi)

0 commit comments

Comments
 (0)
0