Indexed

class Indexed(val base: ColorSpace, val hival: Int, val palette: ByteArray) : ColorSpace

Indexed colour space. Each sample is a single byte 0..hival that indexes into palette; the palette stores base.componentCount bytes per entry.

Constructors

Link copied to clipboard
constructor(base: ColorSpace, hival: Int, palette: ByteArray)

Properties

Link copied to clipboard
Link copied to clipboard
open override val componentCount: Int = 1

Number of input components (1 for Gray, 3 for RGB/Lab, 4 for CMYK).

Link copied to clipboard
val hival: Int
Link copied to clipboard

Functions

Link copied to clipboard

Default fill colour at "the colour space is set to me" — black-equivalent.

Link copied to clipboard
open override fun toRgb(components: DoubleArray): RgbColor

Convert a sample (one float per component, all in 0,1) to RGB.