mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-07-15 00:52:15 +08:00
fix(deps): patch color for future manim versions (#255)
This commit is contained in:
@ -83,7 +83,11 @@ class Slide(Scene): # type:ignore
|
|||||||
if MANIMGL:
|
if MANIMGL:
|
||||||
return self.camera_config["background_color"].hex # type: ignore
|
return self.camera_config["background_color"].hex # type: ignore
|
||||||
else:
|
else:
|
||||||
return config["background_color"].hex # type: ignore
|
color = config["background_color"]
|
||||||
|
if hex_color := getattr(color, "hex", None):
|
||||||
|
return hex_color # type: ignore
|
||||||
|
else: # manim>=0.18, see https://github.com/ManimCommunity/manim/pull/3020
|
||||||
|
return color.to_hex() # type: ignore
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def __resolution(self) -> Tuple[int, int]:
|
def __resolution(self) -> Tuple[int, int]:
|
||||||
|
Reference in New Issue
Block a user