rgba¶
- class janim.components.rgba.Cmpt_Rgba(*args, **kwargs)¶
Bases:
Component,GenericSingle-color component
- DEFAULT_RGBA_ARRAY = <janim.utils.data.Array object>¶
- copy() Self¶
- set_rgba(rgba: Rgba) Self¶
- static format_rgba(rgba: Rgba) ndarray¶
- static format_color(color: JAnimColor) ndarray¶
- set(color: JAnimColor | None = None, alpha: Alpha | None = None, *, root_only: bool = False) Self¶
colorrepresents the passedRGBcolor data, a single color (supports representations such as'#FF0000','red', and[1, 0, 0.5])alpharepresents the passed transparency data (1means opaque,0means fully transparent)By default, all descendant items will also be set to the specified property; passing
root_only=Truelimits it to only the root item
Special argument handling:
When
coloris a four-componentRGBAcolor value, it represents bothcolorandalpha, so thealphaparameter cannot be passed again
- get() ndarray¶
- mix(color: JAnimColor, factor: float = 0.5, *, root_only: bool = False) Self¶
- mix_alpha(alpha: Alpha, factor: float = 0.5, *, root_only: bool = False) Self¶