mirror of
https://github.com/3b1b/manim.git
synced 2025-08-03 04:04:36 +08:00
Tiny stylistic change to rgb_to_hex
This commit is contained in:
@ -35,7 +35,7 @@ def rgba_to_color(rgba):
|
||||
|
||||
|
||||
def rgb_to_hex(rgb):
|
||||
return "#" + "".join('%02x' % int(255 * x) for x in rgb)
|
||||
return "#" + "".join(hex(int(255 * x))[2:] for x in rgb)
|
||||
|
||||
|
||||
def hex_to_rgb(hex_code):
|
||||
|
Reference in New Issue
Block a user