color
¶
Color
¶
Bases: Color
__str__()
¶
Convert color to RGB string for Typst rendering.
Why
Typst templates need colors as rgb(r,g,b) strings. Override ensures Color objects serialize correctly in Jinja2 templates.
Returns:
-
str–RGB string like "rgb(255, 0, 0)".