Ensure color_to_hex always returns 6 character hex codes

This commit is contained in:
Grant Sanderson 2022-12-20 12:21:09 -08:00
parent d4417d3d07
commit 1a485ddd19

View file

@ -63,7 +63,7 @@ def color_to_int_rgba(color: ManimColor, opacity: float = 1.0) -> np.ndarray[int
def color_to_hex(color: ManimColor) -> str:
return Color(color).hex.upper()
return Color(color).get_hex_l().upper()
def hex_to_int(rgb_hex: str) -> int: