Skip to content

Brush

Defined in: api/node/typescript/index.ts:30 ↗

A brush describes how a shape, such as a rectangle, path or even text, is filled.

A brush or color property takes an object with a color, or a brush read from another property. It also takes a color string as a .slint file writes it, such as "#ff000080" or "blue".

Reading a brush or color property returns a brush whose toString() returns a color as #rrggbb, or #rrggbbaa if it isn’t opaque. It returns a linear or radial gradient in the syntax of CSS, with alpha channels from 0 to 255, such as linear-gradient(90deg, rgba(255, 0, 0, 255) 0%, rgba(0, 0, 255, 255) 100%).

optional color?: RgbaColor

Defined in: api/node/typescript/index.ts:35 ↗

The color of a solid color brush. If it isn’t set, the brush is transparent. For a gradient, the color of its first stop.


© 2026 SixtyFPS GmbH