Returns true if color string is empty and gradient/pattern/texture are all null.
Returns true if isNull is true OR a solid color represents a transparent color.
Returns any color previously set on the color property, if any (default is an empty string).
Set brush style as a solid color.
Input value must be a format accepted by CanvasRenderingContext2D fillStyle and strokeStyle properties:
a CSS named color, #RGB[A] hex values, rgb[a](r g b [/ a]), hsl[a](h s l [/ a]), or hwb(h w b [/ a])
Setting a color will override all other styles (even if it is empty or transparent).
Specifies a gradient to use for the drawing style. Setting a gradient will override all other styles (even if it is null).
Specifies a pattern to use for the drawing style. Setting a pattern will override all other styles (even if it is null).
Specifies a texture to use for the drawing style. Setting a texture will override all other styles (even if it is null).
Returns the current style to apply to canvas context properties fillStyle or strokeStyle.
Optionalinit: string | PartialDeep<BrushStyle>Applies the current style property to the given ctx as a fillStyle, or strokeStyle if asFill is set to false.
If the current isNull property returns true then no styles are applied.
Class for storing a fill or stroke style to use on a Canvas context.