mirror of
https://github.com/3b1b/manim.git
synced 2025-11-13 16:57:50 +00:00
Tiny stylistic change to rgb_to_hex
This commit is contained in:
parent
c34bb7912c
commit
025f6d9524
1 changed files with 1 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue