openrndr / org.openrndr.color / ColorRGBa

ColorRGBa

data class ColorRGBa

Color in RGBa space

Parameters

r - red in 0,1

g - green in 0,1

b - blue in 0,1

a - alpha in 0,1

Types

Component

enum class Component

Constructors

<init>

ColorRGBa(r: Double, g: Double, b: Double, a: Double = 1.0, linearity: Linearity = Linearity.UNKNOWN)

Color in RGBa space

Properties

a

val a: Double

alpha in 0,1

alphaMultiplied

val alphaMultiplied: ColorRGBa

b

val b: Double

blue in 0,1

g

val g: Double

green in 0,1

linearity

val linearity: Linearity

maxValue

val maxValue: Double

minValue

val minValue: Double

r

val r: Double

red in 0,1

saturated

val saturated: ColorRGBa

Copy of the the color with all of its fields coerced to 0,1

Functions

opacify

fun opacify(opacity: Double): ColorRGBa

shade

fun shade(shade: Double): ColorRGBa

toHSLa

fun toHSLa(): ColorHSLa

toHSVa

fun toHSVa(): ColorHSVa

toLABa

fun toLABa(ref: ColorXYZa = ColorXYZa.NEUTRAL): ColorLABa

toLCHABa

fun toLCHABa(ref: ColorXYZa = ColorXYZa.NEUTRAL): ColorLCHABa

toLCHUVa

fun toLCHUVa(ref: ColorXYZa = ColorXYZa.NEUTRAL): ColorLCHUVa

toLUVa

fun toLUVa(ref: ColorXYZa = ColorXYZa.NEUTRAL): ColorLUVa

toLinear

fun toLinear(): ColorRGBa

toSRGB

fun toSRGB(): ColorRGBa

toXYZa

fun toXYZa(): ColorXYZa

Companion Object Properties

BLACK

val BLACK: ColorRGBa

BLUE

val BLUE: ColorRGBa

GRAY

val GRAY: ColorRGBa

GREEN

val GREEN: ColorRGBa

PINK

val PINK: ColorRGBa

RED

val RED: ColorRGBa

TRANSPARENT

val TRANSPARENT: ColorRGBa

WHITE

val WHITE: ColorRGBa

YELLOW

val YELLOW: ColorRGBa

Companion Object Functions

fromHex

fun fromHex(hex: Int): ColorRGBa

fromVector

fun fromVector(vector: Vector3, alpha: Double = 1.0): ColorRGBa
fun fromVector(vector: Vector4): ColorRGBa