Companion

Types

Link copied to clipboard

Properties

Link copied to clipboard

An immutable Color instance initialized to CSS color #F0F8FF

Link copied to clipboard

An immutable Color instance initialized to CSS color #FAEBD7

Link copied to clipboard
val AQUA: Color

An immutable Color instance initialized to CSS color #00FFFF

Link copied to clipboard

An immutable Color instance initialized to CSS color #7FFFD4

Link copied to clipboard

An immutable Color instance initialized to CSS color #F0FFFF

Link copied to clipboard

An immutable Color instance initialized to CSS color #F5F5DC

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFE4C4

Link copied to clipboard

An immutable Color instance initialized to CSS color #000000

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFEBCD

Link copied to clipboard
val BLUE: Color

An immutable Color instance initialized to CSS color #0000FF

Link copied to clipboard

An immutable Color instance initialized to CSS color #8A2BE2

Link copied to clipboard

An immutable Color instance initialized to CSS color #A52A2A

Link copied to clipboard

An immutable Color instance initialized to CSS color #DEB887

Link copied to clipboard

An immutable Color instance initialized to CSS color #5F9EA0

Link copied to clipboard

An immutable Color instance initialized to CSS color #7FFF00

Link copied to clipboard

An immutable Color instance initialized to CSS color #D2691E

Link copied to clipboard

An immutable Color instance initialized to CSS color #FF7F50

Link copied to clipboard

An immutable Color instance initialized to CSS color #6495ED

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFF8DC

Link copied to clipboard

An immutable Color instance initialized to CSS color #DC143C

Link copied to clipboard
val CYAN: Color

An immutable Color instance initialized to CSS color #00FFFF

Link copied to clipboard

An immutable Color instance initialized to CSS color #00008B

Link copied to clipboard

An immutable Color instance initialized to CSS color #008B8B

Link copied to clipboard

An immutable Color instance initialized to CSS color #B8860B

Link copied to clipboard

An immutable Color instance initialized to CSS color #A9A9A9

Link copied to clipboard

An immutable Color instance initialized to CSS color #006400

Link copied to clipboard

An immutable Color instance initialized to CSS color #A9A9A9

Link copied to clipboard

An immutable Color instance initialized to CSS color #BDB76B

Link copied to clipboard

An immutable Color instance initialized to CSS color #8B008B

Link copied to clipboard

An immutable Color instance initialized to CSS color #556B2F

Link copied to clipboard

An immutable Color instance initialized to CSS color #FF8C00

Link copied to clipboard

An immutable Color instance initialized to CSS color #9932CC

Link copied to clipboard

An immutable Color instance initialized to CSS color #8B0000

Link copied to clipboard

An immutable Color instance initialized to CSS color #E9967A

Link copied to clipboard

An immutable Color instance initialized to CSS color #8FBC8F

Link copied to clipboard

An immutable Color instance initialized to CSS color #483D8B

Link copied to clipboard

An immutable Color instance initialized to CSS color #2F4F4F

Link copied to clipboard

An immutable Color instance initialized to CSS color #2F4F4F

Link copied to clipboard

An immutable Color instance initialized to CSS color #00CED1

Link copied to clipboard

An immutable Color instance initialized to CSS color #9400D3

Link copied to clipboard

An immutable Color instance initialized to CSS color #FF1493

Link copied to clipboard

An immutable Color instance initialized to CSS color #00BFFF

Link copied to clipboard

An immutable Color instance initialized to CSS color #696969

Link copied to clipboard

An immutable Color instance initialized to CSS color #696969

Link copied to clipboard

An immutable Color instance initialized to CSS color #1E90FF

Link copied to clipboard

An immutable Color instance initialized to CSS color #B22222

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFFAF0

Link copied to clipboard

An immutable Color instance initialized to CSS color #228B22

Link copied to clipboard

An immutable Color instance initialized to CSS color #FF00FF

Link copied to clipboard

An immutable Color instance initialized to CSS color #DCDCDC

Link copied to clipboard

An immutable Color instance initialized to CSS color #F8F8FF

Link copied to clipboard
val GOLD: Color

An immutable Color instance initialized to CSS color #FFD700

Link copied to clipboard

An immutable Color instance initialized to CSS color #DAA520

Link copied to clipboard
val GRAY: Color

An immutable Color instance initialized to CSS color #808080

Link copied to clipboard

An immutable Color instance initialized to CSS color #008000

Link copied to clipboard

An immutable Color instance initialized to CSS color #ADFF2F

Link copied to clipboard
val GREY: Color

An immutable Color instance initialized to CSS color #808080

Link copied to clipboard

An immutable Color instance initialized to CSS color #F0FFF0

Link copied to clipboard

An immutable Color instance initialized to CSS color #FF69B4

Link copied to clipboard

An immutable Color instance initialized to CSS color #CD5C5C

Link copied to clipboard

An immutable Color instance initialized to CSS color #4B0082

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFFFF0

Link copied to clipboard

An immutable Color instance initialized to CSS color #F0E68C

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFF0F5

Link copied to clipboard

An immutable Color instance initialized to CSS color #E6E6FA

Link copied to clipboard

An immutable Color instance initialized to CSS color #7CFC00

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFFACD

Link copied to clipboard

An immutable Color instance initialized to CSS color #ADD8E6

Link copied to clipboard

An immutable Color instance initialized to CSS color #F08080

Link copied to clipboard

An immutable Color instance initialized to CSS color #E0FFFF

Link copied to clipboard

An immutable Color instance initialized to CSS color #FAFAD2

Link copied to clipboard

An immutable Color instance initialized to CSS color #D3D3D3

Link copied to clipboard

An immutable Color instance initialized to CSS color #90EE90

Link copied to clipboard

An immutable Color instance initialized to CSS color #D3D3D3

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFB6C1

Link copied to clipboard

An immutable Color instance initialized to CSS color #20B2AA

Link copied to clipboard

An immutable Color instance initialized to CSS color #87CEFA

Link copied to clipboard

An immutable Color instance initialized to CSS color #778899

Link copied to clipboard

An immutable Color instance initialized to CSS color #778899

Link copied to clipboard

An immutable Color instance initialized to CSS color #B0C4DE

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFFFE0

Link copied to clipboard
val LIME: Color

An immutable Color instance initialized to CSS color #00FF00

Link copied to clipboard

An immutable Color instance initialized to CSS color #32CD32

Link copied to clipboard

An immutable Color instance initialized to CSS color #FAF0E6

Link copied to clipboard

An immutable Color instance initialized to CSS color #FF00FF

Link copied to clipboard

An immutable Color instance initialized to CSS color #800000

Link copied to clipboard

An immutable Color instance initialized to CSS color #66CDAA

Link copied to clipboard

An immutable Color instance initialized to CSS color #0000CD

Link copied to clipboard

An immutable Color instance initialized to CSS color #BA55D3

Link copied to clipboard

An immutable Color instance initialized to CSS color #9370DB

Link copied to clipboard

An immutable Color instance initialized to CSS color #3CB371

Link copied to clipboard

An immutable Color instance initialized to CSS color #7B68EE

Link copied to clipboard

An immutable Color instance initialized to CSS color #00FA9A

Link copied to clipboard

An immutable Color instance initialized to CSS color #48D1CC

Link copied to clipboard

An immutable Color instance initialized to CSS color #C71585

Link copied to clipboard

An immutable Color instance initialized to CSS color #191970

Link copied to clipboard

An immutable Color instance initialized to CSS color #F5FFFA

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFE4E1

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFE4B5

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFDEAD

Link copied to clipboard
val NAVY: Color

An immutable Color instance initialized to CSS color #000080

Link copied to clipboard

An immutable Color instance initialized to CSS color #FDF5E6

Link copied to clipboard

An immutable Color instance initialized to CSS color #808000

Link copied to clipboard

An immutable Color instance initialized to CSS color #6B8E23

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFA500

Link copied to clipboard

An immutable Color instance initialized to CSS color #FF4500

Link copied to clipboard

An immutable Color instance initialized to CSS color #DA70D6

Link copied to clipboard
open override val packedLength: Int

The number of elements used to pack the object into an array.

Link copied to clipboard

An immutable Color instance initialized to CSS color #EEE8AA

Link copied to clipboard

An immutable Color instance initialized to CSS color #98FB98

Link copied to clipboard

An immutable Color instance initialized to CSS color #AFEEEE

Link copied to clipboard

An immutable Color instance initialized to CSS color #DB7093

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFEFD5

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFDAB9

Link copied to clipboard
val PERU: Color

An immutable Color instance initialized to CSS color #CD853F

Link copied to clipboard
val PINK: Color

An immutable Color instance initialized to CSS color #FFC0CB

Link copied to clipboard
val PLUM: Color

An immutable Color instance initialized to CSS color #DDA0DD

Link copied to clipboard

An immutable Color instance initialized to CSS color #B0E0E6

Link copied to clipboard

An immutable Color instance initialized to CSS color #800080

Link copied to clipboard
val RED: Color

An immutable Color instance initialized to CSS color #FF0000

Link copied to clipboard

An immutable Color instance initialized to CSS color #BC8F8F

Link copied to clipboard

An immutable Color instance initialized to CSS color #4169E1

Link copied to clipboard

An immutable Color instance initialized to CSS color #8B4513

Link copied to clipboard

An immutable Color instance initialized to CSS color #FA8072

Link copied to clipboard

An immutable Color instance initialized to CSS color #F4A460

Link copied to clipboard

An immutable Color instance initialized to CSS color #2E8B57

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFF5EE

Link copied to clipboard

An immutable Color instance initialized to CSS color #A0522D

Link copied to clipboard

An immutable Color instance initialized to CSS color #C0C0C0

Link copied to clipboard

An immutable Color instance initialized to CSS color #87CEEB

Link copied to clipboard

An immutable Color instance initialized to CSS color #6A5ACD

Link copied to clipboard

An immutable Color instance initialized to CSS color #708090

Link copied to clipboard

An immutable Color instance initialized to CSS color #708090

Link copied to clipboard
val SNOW: Color

An immutable Color instance initialized to CSS color #FFFAFA

Link copied to clipboard

An immutable Color instance initialized to CSS color #00FF7F

Link copied to clipboard

An immutable Color instance initialized to CSS color #4682B4

Link copied to clipboard
val TAN: Color

An immutable Color instance initialized to CSS color #D2B48C

Link copied to clipboard
val TEAL: Color

An immutable Color instance initialized to CSS color #008080

Link copied to clipboard

An immutable Color instance initialized to CSS color #D8BFD8

Link copied to clipboard

An immutable Color instance initialized to CSS color #FF6347

Link copied to clipboard

An immutable Color instance initialized to CSS transparent.

Link copied to clipboard

An immutable Color instance initialized to CSS color #40E0D0

Link copied to clipboard

An immutable Color instance initialized to CSS color #EE82EE

Link copied to clipboard

An immutable Color instance initialized to CSS color #F5DEB3

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFFFFF

Link copied to clipboard

An immutable Color instance initialized to CSS color #F5F5F5

Link copied to clipboard

An immutable Color instance initialized to CSS color #FFFF00

Link copied to clipboard

An immutable Color instance initialized to CSS color #9ACD32

Functions

Link copied to clipboard
fun add(left: Color, right: Color, result: Color): Color

Computes the componentwise sum of two Colors.

Link copied to clipboard
fun byteToFloat(number: Double): Double

Converts a 'byte' color component in the range of 0 to 255 into a 'float' color component in the range of 0 to 1.0.

Link copied to clipboard
fun clone(color: Color, result: Color? = definedExternally): Color

Duplicates a Color.

Link copied to clipboard
fun divide(left: Color, right: Color, result: Color): Color

Computes the componentwise quotient of two Colors.

Link copied to clipboard
fun divideByScalar(color: Color, scalar: Double, result: Color): Color

Divides the provided Color componentwise by the provided scalar.

Link copied to clipboard
fun equals(left: Color, right: Color): Boolean

Returns true if the first Color equals the second color.

Link copied to clipboard
fun floatToByte(number: Double): Double

Converts a 'float' color component in the range of 0 to 1.0 into a 'byte' color component in the range of 0 to 255.

Link copied to clipboard
fun fromAlpha(color: Color, alpha: Double, result: Color? = definedExternally): Color

Creates a new Color that has the same red, green, and blue components of the specified color, but with the specified alpha value.

Link copied to clipboard
fun fromBytes(red: Double? = definedExternally, green: Double? = definedExternally, blue: Double? = definedExternally, alpha: Double? = definedExternally, result: Color? = definedExternally): Color

Creates a new Color specified using red, green, blue, and alpha values that are in the range of 0 to 255, converting them internally to a range of 0.0 to 1.0.

Link copied to clipboard
fun fromCartesian4(cartesian: Cartesian4, result: Color? = definedExternally): Color

Creates a Color instance from a Cartesian4. x, y, z, and w map to red, green, blue, and alpha, respectively.

Link copied to clipboard
fun fromCssColorString(color: String, result: Color? = definedExternally): Color

Creates a Color instance from a CSS color value.

Link copied to clipboard
fun fromHsl(hue: Double? = definedExternally, saturation: Double? = definedExternally, lightness: Double? = definedExternally, alpha: Double? = definedExternally, result: Color? = definedExternally): Color

Creates a Color instance from hue, saturation, and lightness.

Link copied to clipboard
fun fromRandom(options: Color.Companion.FromRandomOptions? = definedExternally, result: Color? = definedExternally): Color

Creates a random color using the provided options. For reproducible random colors, you should call Math.setRandomNumberSeed once at the beginning of your application.

Link copied to clipboard
fun fromRgba(rgba: Double, result: Color? = definedExternally): Color

Creates a new Color from a single numeric unsigned 32-bit RGBA value, using the endianness of the system.

Link copied to clipboard
fun lerp(start: Color, end: Color, t: Double, result: Color): Color

Computes the linear interpolation or extrapolation at t between the provided colors.

Link copied to clipboard
fun mod(left: Color, right: Color, result: Color): Color

Computes the componentwise modulus of two Colors.

Link copied to clipboard
fun multiply(left: Color, right: Color, result: Color): Color

Computes the componentwise product of two Colors.

Link copied to clipboard
fun multiplyByScalar(color: Color, scalar: Double, result: Color): Color

Multiplies the provided Color componentwise by the provided scalar.

Link copied to clipboard
open override fun pack(value: Color, array: ReadonlyArray<Double>, startingIndex: Int?): ReadonlyArray<Double>

Stores the provided instance into the provided array.

Link copied to clipboard
fun subtract(left: Color, right: Color, result: Color): Color

Computes the componentwise difference of two Colors.

Link copied to clipboard
open override fun unpack(array: ReadonlyArray<Double>, startingIndex: Int?, result: Color?): Color

Retrieves an instance from a packed array.