ColorFunction

data class ColorFunction(val space: Color.ColorFunction.Space, val c1: Double, val c2: Double, val c3: Double, val alphaFraction: Double = 1.0) : Color

color(<space> c1 c2 c3 / α) for the sRGB-family color spaces. Channels are 0..1 floats; out-of-gamut values are clipped after any required gamma encoding.

Constructors

Link copied to clipboard
constructor(space: Color.ColorFunction.Space, c1: Double, c2: Double, c3: Double, alphaFraction: Double = 1.0)

Types

Link copied to clipboard

Properties

Link copied to clipboard
open override val alpha: Int

Alpha channel, 0..255 (255 = opaque).

Link copied to clipboard
Link copied to clipboard
open override val blue: Int

Blue channel, 0..255.

Link copied to clipboard
val c1: Double
Link copied to clipboard
val c2: Double
Link copied to clipboard
val c3: Double
Link copied to clipboard
open override val green: Int

Green channel, 0..255.

Link copied to clipboard
open override val red: Int

Red channel, 0..255.

Link copied to clipboard

Functions

Link copied to clipboard
open fun toCssString(): String

Canonical CSS string form for this color (e.g. #ff8800, rgba(255, 0, 0, 0.5)).