Skip to content

Commit 6f523c2

Browse files
committed
added docstrings and method to create colors if empty
1 parent 6509054 commit 6f523c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

labelbox/schema/ontology.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def _update_colors(self):
331331
hsv_color = (index * 1 / num_tools, 1, 1)
332332
rgb_color = tuple(
333333
int(255 * x) for x in colorsys.hsv_to_rgb(*hsv_color))
334-
if self.tools[index].color is None:
334+
if self.tools[index].color == "#000000":
335335
self.tools[index].color = '#%02x%02x%02x' % rgb_color
336336

337337
@classmethod

0 commit comments

Comments
 (0)