color

A fixed color from a hex string ("#RRGGBB" or "#AARRGGBB"), independent of the app's theme.


fun color(r: Float = 0.0f, g: Float = 0.0f, b: Float = 0.0f, alpha: Float = 1.0f): ColorSchema.Rgba

A fixed color from individual RGBA float components (each 0f–1f), independent of the app's theme.

Parameters

r

Red channel, from 0f to 1f. Defaults to 0f.

g

Green channel, from 0f to 1f. Defaults to 0f.

b

Blue channel, from 0f to 1f. Defaults to 0f.

alpha

Opacity, from 0f to 1f. Defaults to 1f.


A theme-driven color that resolves to value from the app's active Material 3 ColorScheme at render time — use with one of the themeColor* tokens so the tile follows theme and light/dark changes automatically.