Property List
The following properties can be set as attributes: The following can be assigned as children:color
Sets the color used when stroking and filling. Supports CSS color values and hex numbers. Type:Color (string or number)
Supported Color Formats
- Named colors:
red,blue,lightblue, etc. - Hex:
#rgb,#rrggbb,#rrggbbaa - RGB:
rgb(r, g, b),rgba(r, g, b, a) - HSL:
hsl(h, s%, l%),hsla(h, s%, l%, a) - Hex numbers:
0xAARRGGBB(ARGB format)
opacity
Controls transparency. Range: 0 (fully transparent) to 1 (fully opaque). Type:number
blendMode
Controls how colors blend with the background. Type:BlendMode
Values: See Blend Modes for complete list and descriptions.
Porter-Duff Modes
clear, src, dst, srcOver, dstOver, srcIn, dstIn, srcOut, dstOut, srcATop, dstATop, xor, plus
Separable Blend Modes
modulate, screen, overlay, darken, lighten, colorDodge, colorBurn, hardLight, softLight, difference, exclusion, multiply
Non-Separable Modes
hue, saturation, color, luminosity
Custom Modes
plusDarker, plusLighter
style
Determines whether to fill or stroke the shape. Type:"fill" | "stroke"Default:
"fill"
strokeWidth
Sets the thickness of strokes. Type:numberDefault:
1
strokeJoin
Controls the geometry at stroke corners. Type:"miter" | "round" | "bevel"Default:
"miter"
miter: Sharp corner (default)round: Rounded cornerbevel: Flat corner
strokeCap
Controls the geometry at the ends of strokes. Type:"butt" | "round" | "square"Default:
"butt"
butt: Flat end at the exact endpoint (default)round: Rounded end extending beyond endpointsquare: Square end extending beyond endpoint
strokeMiter
Limit at which sharp corners are beveled. Type:numberDefault:
4
strokeWidth * strokeMiter, the corner is beveled instead.
antiAlias
Enables edge smoothing for better quality. Type:booleanDefault:
true
dither
Distributes color error to reduce banding in gradients. Type:booleanDefault:
false
Combining Properties
See Also
- Paint Overview - Understanding paint application
- Blend Modes - Complete blend mode reference
- Shaders - Gradient and pattern fills
- Group Component - Grouping and inheritance