The fill attribute accepts hex colors, gradient functions, and token references. Alpha is encoded as the last byte of an 8-digit hex: #1C1C1ECC.
Fill Values
propertyfill attribute formatsThe fill attribute accepts hex colors, gradient functions, and token references. Alpha is encoded as the last byte of an 8-digit hex: #1C1C1ECC.
Gradient syntax mirrors CSS — linear-gradient(), radial-gradient(), conic-gradient(). Token references use $name syntax.
| Attr | Type | Description |
|---|---|---|
Hex opaque | format | #1C1C1E. |
Hex + alpha | format | #1C1C1ECC (last byte = alpha). |
Linear gradient | format | linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%). |
Radial gradient | format | radial-gradient(circle at 50% 30%, #FFF 0%, #000 100%). |
Angular gradient | format | conic-gradient(from 0deg at 50% 50%, #F00 0deg, #00F 360deg). |
Token | format | $primary. |
Fill values in use
<rect fill="#1C1C1ECC" w="100" h="100" /> <rect fill="linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%)" w="fill" h="160" /> <rect fill="$primary" w="fill" h="52" radius="12" />