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 21d8895 commit 164b7c7Copy full SHA for 164b7c7
ipyleaflet/velocity.py
@@ -74,10 +74,9 @@ class Velocity(Layer):
74
def _default_color_scale(self):
75
self.color_scale = []
76
77
- for i in range(len(self.colormap.colors)):
78
- rgb_tuple = tuple(str(int(x * 256)) for x in self.colormap.colors[i][:3])
79
- rgb_tuple_str = " , ".join(rgb_tuple)
80
- rgb_str = 'rgb(' + rgb_tuple_str + ')'
+ for color in self.colormap.colors:
+ rgb_tuple = tuple(int(x * 256) for x in color[:3])
+ rgb_str = f'rgb({" , ".join(rgb_tuple)})'
81
self.color_scale.append(rgb_str)
82
83
return self.color_scale
0 commit comments