Rgb

interface Rgb : Color(source)

Inheritors

Properties

Link copied to clipboard
abstract val alpha: Int
Link copied to clipboard
abstract val alphaf: Float
Link copied to clipboard
abstract val blue: Int
Link copied to clipboard
abstract val bluef: Float
Link copied to clipboard
abstract val green: Int
Link copied to clipboard
abstract val greenf: Float
Link copied to clipboard

Check if a color is perceived bright or not.

Link copied to clipboard

Calculate a color's luminance, which is a calculation for how bright it is perceived to be by the human eye.

Link copied to clipboard
abstract val red: Int
Link copied to clipboard
abstract val redf: Float
Link copied to clipboard
abstract val value: Int

Functions

Link copied to clipboard
abstract fun copy(red: Int = this.red, green: Int = this.green, blue: Int = this.blue, alpha: Int = this.alpha): Color.Rgb
Link copied to clipboard
abstract fun copyf(red: Float = redf, green: Float = this.greenf, blue: Float = this.bluef, alpha: Float = this.alphaf): Color.Rgb
Link copied to clipboard
abstract fun darkened(byPercent: Float = DEFAULT_SHIFTING_PERCENT): Color

Darken this color by some target percent value.

Link copied to clipboard
abstract fun inverted(): Color
Link copied to clipboard
fun Color.lightened(byPercent: Float = Color.DEFAULT_SHIFTING_PERCENT): Color

Lighten this color by some target percent value.

Link copied to clipboard
abstract fun toHsl(): Color.Hsl
Link copied to clipboard
abstract fun toRgb(): Color.Rgb