Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent feaca46 commit a863457Copy full SHA for a863457
1 file changed
lib/matplotlib/colors.py
@@ -282,13 +282,14 @@ def to_rgb(self, arg):
282
283
try:
284
if cbook.is_string_like(arg):
285
- color = self.colors.get(arg, None)
+ argl = arg.lower()
286
+ color = self.colors.get(argl, None)
287
if color is None:
- str1 = cnames.get(arg, arg)
288
+ str1 = cnames.get(argl, argl)
289
if str1.startswith('#'):
290
color = hex2color(str1)
291
else:
- fl = float(arg)
292
+ fl = float(argl)
293
if fl < 0 or fl > 1:
294
raise ValueError(
295
'gray (string) must be in range 0-1')
0 commit comments