Optionalvalue: ColorSourceOptional value to use, if not provided, white is used.
Get alpha component (0 - 1)
Get blue component (0 - 1)
Get green component (0 - 1)
Get red component (0 - 1)
The current color source.
When setting:
Color will copy its color source and components.Color will try to normalize the color source and set the components.
If the color source is invalid, an Error will be thrown and the Color will left unchanged.Note: The null in the setter's parameter type is added to match the TypeScript rule: return type of getter
must be assignable to its setter's parameter type. Setting value to null will throw an Error.
When getting:
null means the previous value was overridden (e.g., PIXI.Color.multiply multiply,
PIXI.Color.premultiply premultiply or PIXI.Color.round round).Multiply with another color. This action is destructive, and will
override the previous value property to be null.
The color to multiply by.
Converts color to a premultiplied alpha format. This action is destructive, and will
override the previous value property to be null.
The alpha to multiply by.
OptionalapplyToRGB: booleanWhether to premultiply RGB channels.
Set alpha, suitable for chaining.
Premultiplies alpha with current color.
The alpha to multiply by.
OptionalapplyToRGB: booleanWhether to premultiply RGB channels.
tint multiplied by alpha
Convert to a CSS-style rgba string: rgba(255,255,255,1.0).
Color utility class.
Example
Memberof
PIXI
Since
7.2.0