Rgb

class Rgb : Color(source)

Properties

Link copied to clipboard
val alpha: Int
Link copied to clipboard
Link copied to clipboard
val blue: Int
Link copied to clipboard
Link copied to clipboard
val green: Int
Link copied to clipboard
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
val red: Int
Link copied to clipboard
val redf: Float
Link copied to clipboard
val value: Int

A hex value representing this color as AARRGGBB, e.g. 0xFFFF0000 is red and 0xFF0000FF is blue.

Functions

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

Darken this color by some target percent value.

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
open override 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
open override fun toHsl(): Color.Hsl
Link copied to clipboard
open override fun toRgb(): Color.Rgb
Link copied to clipboard
open override fun toString(): String