← back to roto on ba3a.dev

Palette

data class Palette(val colors: List<Int>)

A project's palette: the opaque colours every draft is drawn in, in the order the palette file lists them. At most MAX_COLORS: an indexed .ase holds 256 entries, and the handoff keeps one of them for transparency.

Constructors

Link copied to clipboard
constructor(colors: List<Int>)

Types

Link copied to clipboard
object Companion

Limits.

Properties

Link copied to clipboard

the opaque colours as Argb, in the order the palette file lists them

Functions

Link copied to clipboard
operator fun contains(argb: Int): Boolean

Whether argb is one of the palette's colours.

Link copied to clipboard
fun paint(labels: IndexedRaster): Raster

A map of palette labels — palette index plus one, 0 transparent — as the colours they stand for.