RGB

value class RGB(val value: Int)(source)

Represents an ARGB color, with one byte per component.

Parameters

value

An ARGB color value packed into an Int.

Constructors

Link copied to clipboard
constructor(value: Int)
constructor(red: Int, green: Int, blue: Int, alpha: Int = 255)

Creates an RGB instance from red, green, blue, and alpha components. Each value must be in the range 0 to 255 inclusive. If alpha is not provided, it defaults to 255, making the color opaque.

Properties

Link copied to clipboard
val alpha: Int

The alpha component of this color.

Link copied to clipboard
val blue: Int

The blue component of this color.

Link copied to clipboard
val green: Int

The green component of this color.

Link copied to clipboard
val red: Int

The red component of this color.

Link copied to clipboard
val value: Int

Functions

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