Color

data class Color(val r: Float, val g: Float, val b: Float)

An RGB color (linear or sRGB depending on the consuming API). Distinct from the spatial vectors so a Color can't be passed as a Position. Components are r/g/b.

Constructors

Link copied to clipboard
constructor(r: Float, g: Float, b: Float)
constructor(v: Float)

Uniform value on all channels (grey).

constructor(v: Float3)

From a filament-utils Float3 (x→r, y→g, z→b).

Properties

Link copied to clipboard
val b: Float
Link copied to clipboard
val g: Float
Link copied to clipboard
val r: Float

Functions

Link copied to clipboard
operator fun plus(o: Color): Color
Link copied to clipboard
operator fun times(s: Float): Color
Link copied to clipboard