ColorStopSchema

@Serializable
data class ColorStopSchema(val color: ColorSchema, val stop: Float? = null)

A single color of a gradient, optionally pinned to a position along the gradient axis.

stop is a 0f..1f fraction of the gradient axis. When every stop of a gradient is null, the colors are spread evenly (matching Compose's Brush.xGradient(colors, …) overloads). When any stop is provided, the client fills the remaining null stops with an even distribution so colors and stops always have the same size.

DSL (mosaic-server): gradients accept either vararg Pair<Float, ColorSchema> (0f to color(...)) or a plain List<ColorSchema> for the evenly-spread case.

Constructors

Link copied to clipboard
constructor(color: ColorSchema, stop: Float? = null)

Properties

Link copied to clipboard
@SerialName(value = "color")
val color: ColorSchema
Link copied to clipboard
@SerialName(value = "stop")
val stop: Float?