Chroma

class Chroma(hue: Float, saturation: Float, brightness: Float, alpha: Float, var speedNanos: Long) : PolyColor.Mutable

Constructors

Link copied to clipboard
constructor(hue: Float, saturation: Float, brightness: Float, alpha: Float, speedNanos: Long)

Properties

Link copied to clipboard
@get:JvmName(name = "alpha")
open val a: Int

alpha value of this color, from 0 to 255

Link copied to clipboard
override var alpha: Float

The alpha of this color. Clamped between 0f..1f.

Link copied to clipboard
override var argb: Int

return an integer representation of this color. Utilizes bit-shifts to store the color as one 32-bit integer, like so:

Link copied to clipboard
@get:JvmName(name = "blue")
open val b: Int

blue value of this color, from 0 to 255

Link copied to clipboard
override var brightness: Float

The brightness of this color. Clamped between 0f..1f.

Link copied to clipboard
@get:JvmName(name = "green")
open val g: Int

green value of this color, from 0 to 255

Link copied to clipboard
override var hue: Float

The hue of this color. Can be any value, but is mod 360, so values are always between 0 and 360.

Link copied to clipboard
@get:JvmName(name = "red")
open val r: Int

red value of this color, from 0 to 255

Link copied to clipboard
override var saturation: Float

The saturation of this color. Clamped between 0f..1f.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun PolyColor.toHex(alpha: Boolean = true, hash: Boolean = true): String
Link copied to clipboard

Return a static java Color object of this color at the instant this method is called.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun update(deltaTimeNanos: Long): Boolean