Skip to content

Commit 345f6fa

Browse files
committed
#added random_color
1 parent e902b20 commit 345f6fa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

manim/utils/color.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,9 @@ def random_bright_color():
331331

332332

333333
def random_color():
334-
return random.choice(list(COLOR_MAP.values()))
335-
334+
import time
335+
random.seed(time.time())
336+
return random.choice([c.value for c in list(Colors)])
336337

337338
def get_shaded_rgb(rgb, point, unit_normal_vect, light_source):
338339
to_sun = normalize(light_source - point)

0 commit comments

Comments
 (0)