ImageOverlayColor
ClassDataClassSource
ImageOverlayColor(
color: str | tuple[float, ...],
pos_shift: tuple[int, int] = (0, 0),
mode: Literal["default", "add", "add_modulo", "screen", "lighter", "subtract", "subtract_modulo", "multiply", "darker", "difference", "soft_light", "hard_light"] = "default"
)
An overlay layer with a pure color.
Fields
| Name | Type | Required | |
|---|---|---|---|
color | str | tuple[float, ...] | The RGB/RGBA color of the overlaying layer. | |
pos_shift | tuple[int, int] | The shift of the overlaying content. By default, the content will be center- aligned with the giving shape. The overlaying content that is outside the shape mask will be cut off. | |
mode | Literal["default", "add", "add_modulo", "screen", "lighter", "subtract", "subtract_modulo", "multiply", "darker", "difference", "soft_light", "hard_light"] | The blender mode of the overlaying effect. |
Methods
overlay
v_1: Image | None = self.overlay(shape: Image)
Generate the overlay image from the given image.
Requires
| Name | Type | Required | |
|---|---|---|---|
shape | Image | An L type image defining the shape of the overlay. This value is provided when rendering the overlaying effect. |
Returns
| Name | Type | |
|---|---|---|
v_1 | Image | None | The generated overlay image. This image can be not This image should be center-aligned with the input Will return |
Properties
intermediate_bg_color
intermediate_bg_color: str | tuple[float, ...] = self.intermediate_bg_color
The intermediate background color. This value may be used when the layer content needs to be rescale.