RGB

class RGB(val red: UByte, val green: UByte, val blue: UByte, alpha: Float = 1.0f) : Color(source)

A color in the Red-Green-Blue (RGB) space.

Each color component is 8 bits, so their values can range from 0u to 255u.

Constructors

Link copied to clipboard
constructor(red: UByte, green: UByte, blue: UByte, alpha: Float = 1.0f)

Properties

Link copied to clipboard

The alpha component for the color, from 0f to 1f

Link copied to clipboard
val blue: UByte

The blue component for the color, from 0u to 255u

Link copied to clipboard

The green component for the color, from 0u to 255u

Link copied to clipboard
val red: UByte

The red component for the color, from 0u to 255u

Functions

Link copied to clipboard
open override fun toHSL(): Color.HSL

Converts the color to the Hue-Saturation-Lightness (HSL) space.

Link copied to clipboard
open override fun toRGB(): Color.RGB

Converts the color to the Red-Green-Blue (RGB) space.

Link copied to clipboard
open override fun toString(): String