Rgb

data class Rgb(val red: Int, val green: Int, val blue: Int) : Color

An opaque rgb(r, g, b) color. alpha is always 255.

Throws

IllegalArgumentException

if any channel is outside 0..255.

Constructors

Link copied to clipboard
constructor(red: Int, green: Int, blue: Int)

Properties

Link copied to clipboard
open override val alpha: Int

Alpha channel, 0..255 (255 = opaque).

Link copied to clipboard
open override val blue: Int

Blue channel, 0..255.

Link copied to clipboard
open override val green: Int

Green channel, 0..255.

Link copied to clipboard
open override val red: Int

Red channel, 0..255.

Functions

Link copied to clipboard
open fun toCssString(): String

Canonical CSS string form for this color (e.g. #ff8800, rgba(255, 0, 0, 0.5)).