@@ -546,23 +546,23 @@ def __copy__(self):
546
546
def set_bad (self , color = 'k' , alpha = None ):
547
547
"""Set color to be used for masked values.
548
548
"""
549
- self ._rgba_bad = colorConverter . to_rgba (color , alpha )
549
+ self ._rgba_bad = to_rgba (color , alpha )
550
550
if self ._isinit :
551
551
self ._set_extremes ()
552
552
553
553
def set_under (self , color = 'k' , alpha = None ):
554
554
"""Set color to be used for low out-of-range values.
555
555
Requires norm.clip = False
556
556
"""
557
- self ._rgba_under = colorConverter . to_rgba (color , alpha )
557
+ self ._rgba_under = to_rgba (color , alpha )
558
558
if self ._isinit :
559
559
self ._set_extremes ()
560
560
561
561
def set_over (self , color = 'k' , alpha = None ):
562
562
"""Set color to be used for high out-of-range values.
563
563
Requires norm.clip = False
564
564
"""
565
- self ._rgba_over = colorConverter . to_rgba (color , alpha )
565
+ self ._rgba_over = to_rgba (color , alpha )
566
566
if self ._isinit :
567
567
self ._set_extremes ()
568
568
@@ -717,7 +717,7 @@ def from_list(name, colors, N=256, gamma=1.0):
717
717
718
718
cdict = dict (red = [], green = [], blue = [], alpha = [])
719
719
for val , color in zip (vals , colors ):
720
- r , g , b , a = colorConverter . to_rgba (color )
720
+ r , g , b , a = to_rgba (color )
721
721
cdict ['red' ].append ((val , r , r ))
722
722
cdict ['green' ].append ((val , g , g ))
723
723
cdict ['blue' ].append ((val , b , b ))
@@ -817,9 +817,8 @@ def __init__(self, colors, name='from_list', N=None):
817
817
Colormap .__init__ (self , name , N )
818
818
819
819
def _init (self ):
820
- rgba = colorConverter .to_rgba_array (self .colors )
821
820
self ._lut = np .zeros ((self .N + 3 , 4 ), float )
822
- self ._lut [:- 3 ] = rgba
821
+ self ._lut [:- 3 ] = to_rgba_array ( self . colors )
823
822
self ._isinit = True
824
823
self ._set_extremes ()
825
824
0 commit comments