# Color

#### new Cesium.Color(red, green, blue, alpha)
engine/Source/Core/Color.js 39

A color, specified using red, green, blue, and alpha values, which range from `0` (no intensity) to `1.0` (full intensity).

Name | Type | Default | Description
--- | --- | --- | ---
`red` | number | `1.0` | optional The red component.
`green` | number | `1.0` | optional The green component.
`blue` | number | `1.0` | optional The blue component.
`alpha` | number | `1.0` | optional The alpha component.

##### See:

- Packable

### Members

#### static constant Cesium.Color.ALICEBLUE : Color
engine/Source/Core/Color.js 969

An immutable Color instance initialized to CSS color #F0F8FF

#### static constant Cesium.Color.ANTIQUEWHITE : Color
engine/Source/Core/Color.js 978

An immutable Color instance initialized to CSS color #FAEBD7

#### static constant Cesium.Color.AQUA : Color
engine/Source/Core/Color.js 987

An immutable Color instance initialized to CSS color #00FFFF

#### static constant Cesium.Color.AQUAMARINE : Color
engine/Source/Core/Color.js 996

An immutable Color instance initialized to CSS color #7FFFD4

#### static constant Cesium.Color.AZURE : Color
engine/Source/Core/Color.js 1005

An immutable Color instance initialized to CSS color #F0FFFF

#### static constant Cesium.Color.BEIGE : Color
engine/Source/Core/Color.js 1014

An immutable Color instance initialized to CSS color #F5F5DC

#### static constant Cesium.Color.BISQUE : Color
engine/Source/Core/Color.js 1023

An immutable Color instance initialized to CSS color #FFE4C4

#### static constant Cesium.Color.BLACK : Color
engine/Source/Core/Color.js 1032

An immutable Color instance initialized to CSS color #000000

#### static constant Cesium.Color.BLANCHEDALMOND : Color
engine/Source/Core/Color.js 1041

An immutable Color instance initialized to CSS color #FFEBCD

#### static constant Cesium.Color.BLUE : Color
engine/Source/Core/Color.js 1050

An immutable Color instance initialized to CSS color #0000FF

#### static constant Cesium.Color.BLUEVIOLET : Color
engine/Source/Core/Color.js 1059

An immutable Color instance initialized to CSS color #8A2BE2

#### static constant Cesium.Color.BROWN : Color
engine/Source/Core/Color.js 1068

An immutable Color instance initialized to CSS color #A52A2A

#### static constant Cesium.Color.BURLYWOOD : Color
engine/Source/Core/Color.js 1077

An immutable Color instance initialized to CSS color #DEB887

#### static constant Cesium.Color.CADETBLUE : Color
engine/Source/Core/Color.js 1086

An immutable Color instance initialized to CSS color #5F9EA0

#### static constant Cesium.Color.CHARTREUSE : Color
engine/Source/Core/Color.js 1094

An immutable Color instance initialized to CSS color #7FFF00

#### static constant Cesium.Color.CHOCOLATE : Color
engine/Source/Core/Color.js 1103

An immutable Color instance initialized to CSS color #D2691E

#### static constant Cesium.Color.CORAL : Color
engine/Source/Core/Color.js 1112

An immutable Color instance initialized to CSS color #FF7F50

#### static constant Cesium.Color.CORNFLOWERBLUE : Color
engine/Source/Core/Color.js 1121

An immutable Color instance initialized to CSS color #6495ED

#### static constant Cesium.Color.CORNSILK : Color
engine/Source/Core/Color.js 1130

An immutable Color instance initialized to CSS color #FFF8DC

#### static constant Cesium.Color.CRIMSON : Color
engine/Source/Core/Color.js 1139

An immutable Color instance initialized to CSS color #DC143C

#### static constant Cesium.Color.CYAN : Color
engine/Source/Core/Color.js 1148

An immutable Color instance initialized to CSS color #00FFFF

#### static constant Cesium.Color.DARKBLUE : Color
engine/Source/Core/Color.js 1157

An immutable Color instance initialized to CSS color #00008B

#### static constant Cesium.Color.DARKCYAN : Color
engine/Source/Core/Color.js 1166

An immutable Color instance initialized to CSS color #008B8B

#### static constant Cesium.Color.DARKGOLDENROD : Color
engine/Source/Core/Color.js 1175

An immutable Color instance initialized to CSS color #B8860B

#### static constant Cesium.Color.DARKGRAY : Color
engine/Source/Core/Color.js 1184

An immutable Color instance initialized to CSS color #A9A9A9

#### static constant Cesium.Color.DARKGREEN : Color
engine/Source/Core/Color.js 1193

An immutable Color instance initialized to CSS color #006400

#### static constant Cesium.Color.DARKGREY : Color
engine/Source/Core/Color.js 1202

An immutable Color instance initialized to CSS color #A9A9A9

#### static constant Cesium.Color.DARKKHAKI : Color
engine/Source/Core/Color.js 1211

An immutable Color instance initialized to CSS color #BDB76B

#### static constant Cesium.Color.DARKMAGENTA : Color
engine/Source/Core/Color.js 1220

An immutable Color instance initialized to CSS color #8B008B

#### static constant Cesium.Color.DARKOLIVEGREEN : Color
engine/Source/Core/Color.js 1229

An immutable Color instance initialized to CSS color #556B2F

#### static constant Cesium.Color.DARKORANGE : Color
engine/Source/Core/Color.js 1238

An immutable Color instance initialized to CSS color #FF8C00

#### static constant Cesium.Color.DARKORCHID : Color
engine/Source/Core/Color.js 1247

An immutable Color instance initialized to CSS color #9932CC

#### static constant Cesium.Color.DARKRED : Color
engine/Source/Core/Color.js 1256

An immutable Color instance initialized to CSS color #8B0000

#### static constant Cesium.Color.DARKSALMON : Color
engine/Source/Core/Color.js 1265

An immutable Color instance initialized to CSS color #E9967A

#### static constant Cesium.Color.DARKSEAGREEN : Color
engine/Source/Core/Color.js 1274

An immutable Color instance initialized to CSS color #8FBC8F

#### static constant Cesium.Color.DARKSLATEBLUE : Color
engine/Source/Core/Color.js 1283

An immutable Color instance initialized to CSS color #483D8B

#### static constant Cesium.Color.DARKSLATEGRAY : Color
engine/Source/Core/Color.js 1292

An immutable Color instance initialized to CSS color #2F4F4F

#### static constant Cesium.Color.DARKSLATEGREY : Color
engine/Source/Core/Color.js 1301

An immutable Color instance initialized to CSS color #2F4F4F

#### static constant Cesium.Color.DARKTURQUOISE : Color
engine/Source/Core/Color.js 1310

An immutable Color instance initialized to CSS color #00CED1

#### static constant Cesium.Color.DARKVIOLET : Color
engine/Source/Core/Color.js 1319

An immutable Color instance initialized to CSS color #9400D3

#### static constant Cesium.Color.DEEPPINK : Color
engine/Source/Core/Color.js 1328

An immutable Color instance initialized to CSS color #FF1493

#### static constant Cesium.Color.DEEPSKYBLUE : Color
engine/Source/Core/Color.js 1337

An immutable Color instance initialized to CSS color #00BFFF

#### static constant Cesium.Color.DIMGRAY : Color
engine/Source/Core/Color.js 1346

An immutable Color instance initialized to CSS color #696969

#### static constant Cesium.Color.DIMGREY : Color
engine/Source/Core/Color.js 1355

An immutable Color instance initialized to CSS color #696969

#### static constant Cesium.Color.DODGERBLUE : Color
engine/Source/Core/Color.js 1364

An immutable Color instance initialized to CSS color #1E90FF

#### static constant Cesium.Color.FIREBRICK : Color
engine/Source/Core/Color.js 1373

An immutable Color instance initialized to CSS color #B22222

#### static constant Cesium.Color.FLORALWHITE : Color
engine/Source/Core/Color.js 1382

An immutable Color instance initialized to CSS color #FFFAF0

#### static constant Cesium.Color.FORESTGREEN : Color
engine/Source/Core/Color.js 1391

An immutable Color instance initialized to CSS color #228B22

#### static constant Cesium.Color.FUCHSIA : Color
engine/Source/Core/Color.js 1400

An immutable Color instance initialized to CSS color #FF00FF

#### static constant Cesium.Color.GAINSBORO : Color
engine/Source/Core/Color.js 1409

An immutable Color instance initialized to CSS color #DCDCDC

#### static constant Cesium.Color.GHOSTWHITE : Color
engine/Source/Core/Color.js 1418

An immutable Color instance initialized to CSS color #F8F8FF

#### static constant Cesium.Color.GOLD : Color
engine/Source/Core/Color.js 1427

An immutable Color instance initialized to CSS color #FFD700

#### static constant Cesium.Color.GOLDENROD : Color
engine/Source/Core/Color.js 1436

An immutable Color instance initialized to CSS color #DAA520

#### static constant Cesium.Color.GRAY : Color
engine/Source/Core/Color.js 1445

An immutable Color instance initialized to CSS color #808080

#### static constant Cesium.Color.GREEN : Color
engine/Source/Core/Color.js 1454

An immutable Color instance initialized to CSS color #008000

#### static constant Cesium.Color.GREENYELLOW : Color
engine/Source/Core/Color.js 1463

An immutable Color instance initialized to CSS color #ADFF2F

#### static constant Cesium.Color.GREY : Color
engine/Source/Core/Color.js 1472

An immutable Color instance initialized to CSS color #808080

#### static constant Cesium.Color.HONEYDEW : Color
engine/Source/Core/Color.js 1481

An immutable Color instance initialized to CSS color #F0FFF0

#### static constant Cesium.Color.HOTPINK : Color
engine/Source/Core/Color.js 1490

An immutable Color instance initialized to CSS color #FF69B4

#### static constant Cesium.Color.INDIANRED : Color
engine/Source/Core/Color.js 1499

An immutable Color instance initialized to CSS color #CD5C5C

#### static constant Cesium.Color.INDIGO : Color
engine/Source/Core/Color.js 1508

An immutable Color instance initialized to CSS color #4B0082

#### static constant Cesium.Color.IVORY : Color
engine/Source/Core/Color.js 1517

An immutable Color instance initialized to CSS color #FFFFF0

#### static constant Cesium.Color.KHAKI : Color
engine/Source/Core/Color.js 1526

An immutable Color instance initialized to CSS color #F0E68C

#### static constant Cesium.Color.LAVENDAR_BLUSH : Color
engine/Source/Core/Color.js 1544

An immutable Color instance initialized to CSS color #FFF0F5

#### static constant Cesium.Color.LAVENDER : Color
engine/Source/Core/Color.js 1535

An immutable Color instance initialized to CSS color #E6E6FA

#### static constant Cesium.Color.LAWNGREEN : Color
engine/Source/Core/Color.js 1553

An immutable Color instance initialized to CSS color #7CFC00

#### static constant Cesium.Color.LEMONCHIFFON : Color
engine/Source/Core/Color.js 1562

An immutable Color instance initialized to CSS color #FFFACD

#### static constant Cesium.Color.LIGHTBLUE : Color
engine/Source/Core/Color.js 1571

An immutable Color instance initialized to CSS color #ADD8E6

#### static constant Cesium.Color.LIGHTCORAL : Color
engine/Source/Core/Color.js 1580

An immutable Color instance initialized to CSS color #F08080

#### static constant Cesium.Color.LIGHTCYAN : Color
engine/Source/Core/Color.js 1589

An immutable Color instance initialized to CSS color #E0FFFF

#### static constant Cesium.Color.LIGHTGOLDENRODYELLOW : Color
engine/Source/Core/Color.js 1598

An immutable Color instance initialized to CSS color #FAFAD2

#### static constant Cesium.Color.LIGHTGRAY : Color
engine/Source/Core/Color.js 1607

An immutable Color instance initialized to CSS color #D3D3D3

#### static constant Cesium.Color.LIGHTGREEN : Color
engine/Source/Core/Color.js 1616

An immutable Color instance initialized to CSS color #90EE90

#### static constant Cesium.Color.LIGHTGREY : Color
engine/Source/Core/Color.js 1625

An immutable Color instance initialized to CSS color #D3D3D3

#### static constant Cesium.Color.LIGHTPINK : Color
engine/Source/Core/Color.js 1634

An immutable Color instance initialized to CSS color #FFB6C1

#### static constant Cesium.Color.LIGHTSEAGREEN : Color
engine/Source/Core/Color.js 1643

An immutable Color instance initialized to CSS color #20B2AA

#### static constant Cesium.Color.LIGHTSKYBLUE : Color
engine/Source/Core/Color.js 1652

An immutable Color instance initialized to CSS color #87CEFA

#### static constant Cesium.Color.LIGHTSLATEGRAY : Color
engine/Source/Core/Color.js 1661

An immutable Color instance initialized to CSS color #778899

#### static constant Cesium.Color.LIGHTSLATEGREY : Color
engine/Source/Core/Color.js 1670

An immutable Color instance initialized to CSS color #778899

#### static constant Cesium.Color.LIGHTSTEELBLUE : Color
engine/Source/Core/Color.js 1679

An immutable Color instance initialized to CSS color #B0C4DE

#### static constant Cesium.Color.LIGHTYELLOW : Color
engine/Source/Core/Color.js 1688

An immutable Color instance initialized to CSS color #FFFFE0

#### static constant Cesium.Color.LIME : Color
engine/Source/Core/Color.js 1697

An immutable Color instance initialized to CSS color #00FF00

#### static constant Cesium.Color.LIMEGREEN : Color
engine/Source/Core/Color.js 1706

An immutable Color instance initialized to CSS color #32CD32

#### static constant Cesium.Color.LINEN : Color
engine/Source/Core/Color.js 1715

An immutable Color instance initialized to CSS color #FAF0E6

#### static constant Cesium.Color.MAGENTA : Color
engine/Source/Core/Color.js 1724

An immutable Color instance initialized to CSS color #FF00FF

#### static constant Cesium.Color.MAROON : Color
engine/Source/Core/Color.js 1733

An immutable Color instance initialized to CSS color #800000

#### static constant Cesium.Color.MEDIUMAQUAMARINE : Color
engine/Source/Core/Color.js 1742

An immutable Color instance initialized to CSS color #66CDAA

#### static constant Cesium.Color.MEDIUMBLUE : Color
engine/Source/Core/Color.js 1751

An immutable Color instance initialized to CSS color #0000CD

#### static constant Cesium.Color.MEDIUMORCHID : Color
engine/Source/Core/Color.js 1760

An immutable Color instance initialized to CSS color #BA55D3

#### static constant Cesium.Color.MEDIUMPURPLE : Color
engine/Source/Core/Color.js 1769

An immutable Color instance initialized to CSS color #9370DB

#### static constant Cesium.Color.MEDIUMSEAGREEN : Color
engine/Source/Core/Color.js 1778

An immutable Color instance initialized to CSS color #3CB371

#### static constant Cesium.Color.MEDIUMSLATEBLUE : Color
engine/Source/Core/Color.js 1787

An immutable Color instance initialized to CSS color #7B68EE

#### static constant Cesium.Color.MEDIUMSPRINGGREEN : Color
engine/Source/Core/Color.js 1796

An immutable Color instance initialized to CSS color #00FA9A

#### static constant Cesium.Color.MEDIUMTURQUOISE : Color
engine/Source/Core/Color.js 1805

An immutable Color instance initialized to CSS color #48D1CC

#### static constant Cesium.Color.MEDIUMVIOLETRED : Color
engine/Source/Core/Color.js 1814

An immutable Color instance initialized to CSS color #C71585

#### static constant Cesium.Color.MIDNIGHTBLUE : Color
engine/Source/Core/Color.js 1823

An immutable Color instance initialized to CSS color #191970

#### static constant Cesium.Color.MINTCREAM : Color
engine/Source/Core/Color.js 1832

An immutable Color instance initialized to CSS color #F5FFFA

#### static constant Cesium.Color.MISTYROSE : Color
engine/Source/Core/Color.js 1841

An immutable Color instance initialized to CSS color #FFE4E1

#### static constant Cesium.Color.MOCCASIN : Color
engine/Source/Core/Color.js 1850

An immutable Color instance initialized to CSS color #FFE4B5

#### static constant Cesium.Color.NAVAJOWHITE : Color
engine/Source/Core/Color.js 1859

An immutable Color instance initialized to CSS color #FFDEAD

#### static constant Cesium.Color.NAVY : Color
engine/Source/Core/Color.js 1868

An immutable Color instance initialized to CSS color #000080

#### static constant Cesium.Color.OLDLACE : Color
engine/Source/Core/Color.js 1877

An immutable Color instance initialized to CSS color #FDF5E6

#### static constant Cesium.Color.OLIVE : Color
engine/Source/Core/Color.js 1886

An immutable Color instance initialized to CSS color #808000

#### static constant Cesium.Color.OLIVEDRAB : Color
engine/Source/Core/Color.js 1895

An immutable Color instance initialized to CSS color #6B8E23

#### static constant Cesium.Color.ORANGE : Color
engine/Source/Core/Color.js 1904

An immutable Color instance initialized to CSS color #FFA500

#### static constant Cesium.Color.ORANGERED : Color
engine/Source/Core/Color.js 1913

An immutable Color instance initialized to CSS color #FF4500

#### static constant Cesium.Color.ORCHID : Color
engine/Source/Core/Color.js 1922

An immutable Color instance initialized to CSS color #DA70D6

#### static Cesium.Color.packedLength : number
engine/Source/Core/Color.js 443

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

#### static constant Cesium.Color.PALEGOLDENROD : Color
engine/Source/Core/Color.js 1931

An immutable Color instance initialized to CSS color #EEE8AA

#### static constant Cesium.Color.PALEGREEN : Color
engine/Source/Core/Color.js 1940

An immutable Color instance initialized to CSS color #98FB98

#### static constant Cesium.Color.PALETURQUOISE : Color
engine/Source/Core/Color.js 1949

An immutable Color instance initialized to CSS color #AFEEEE

#### static constant Cesium.Color.PALEVIOLETRED : Color
engine/Source/Core/Color.js 1958

An immutable Color instance initialized to CSS color #DB7093

#### static constant Cesium.Color.PAPAYAWHIP : Color
engine/Source/Core/Color.js 1967

An immutable Color instance initialized to CSS color #FFEFD5

#### static constant Cesium.Color.PEACHPUFF : Color
engine/Source/Core/Color.js 1976

An immutable Color instance initialized to CSS color #FFDAB9

#### static constant Cesium.Color.PERU : Color
engine/Source/Core/Color.js 1985

An immutable Color instance initialized to CSS color #CD853F

#### static constant Cesium.Color.PINK : Color
engine/Source/Core/Color.js 1994

An immutable Color instance initialized to CSS color #FFC0CB

#### static constant Cesium.Color.PLUM : Color
engine/Source/Core/Color.js 2003

An immutable Color instance initialized to CSS color #DDA0DD

#### static constant Cesium.Color.POWDERBLUE : Color
engine/Source/Core/Color.js 2012

An immutable Color instance initialized to CSS color #B0E0E6

#### static constant Cesium.Color.PURPLE : Color
engine/Source/Core/Color.js 2021

An immutable Color instance initialized to CSS color #800080

#### static constant Cesium.Color.RED : Color
engine/Source/Core/Color.js 2030

An immutable Color instance initialized to CSS color #FF0000

#### static constant Cesium.Color.ROSYBROWN : Color
engine/Source/Core/Color.js 2039

An immutable Color instance initialized to CSS color #BC8F8F

#### static constant Cesium.Color.ROYALBLUE : Color
engine/Source/Core/Color.js 2048

An immutable Color instance initialized to CSS color #4169E1

#### static constant Cesium.Color.SADDLEBROWN : Color
engine/Source/Core/Color.js 2057

An immutable Color instance initialized to CSS color #8B4513

#### static constant Cesium.Color.SALMON : Color
engine/Source/Core/Color.js 2066

An immutable Color instance initialized to CSS color #FA8072

#### static constant Cesium.Color.SANDYBROWN : Color
engine/Source/Core/Color.js 2075

An immutable Color instance initialized to CSS color #F4A460

#### static constant Cesium.Color.SEAGREEN : Color
engine/Source/Core/Color.js 2084

An immutable Color instance initialized to CSS color #2E8B57

#### static constant Cesium.Color.SEASHELL : Color
engine/Source/Core/Color.js 2093

An immutable Color instance initialized to CSS color #FFF5EE

#### static constant Cesium.Color.SIENNA : Color
engine/Source/Core/Color.js 2102

An immutable Color instance initialized to CSS color #A0522D

#### static constant Cesium.Color.SILVER : Color
engine/Source/Core/Color.js 2111

An immutable Color instance initialized to CSS color #C0C0C0

#### static constant Cesium.Color.SKYBLUE : Color
engine/Source/Core/Color.js 2120

An immutable Color instance initialized to CSS color #87CEEB

#### static constant Cesium.Color.SLATEBLUE : Color
engine/Source/Core/Color.js 2129

An immutable Color instance initialized to CSS color #6A5ACD

#### static constant Cesium.Color.SLATEGRAY : Color
engine/Source/Core/Color.js 2138

An immutable Color instance initialized to CSS color #708090

#### static constant Cesium.Color.SLATEGREY : Color
engine/Source/Core/Color.js 2147

An immutable Color instance initialized to CSS color #708090

#### static constant Cesium.Color.SNOW : Color
engine/Source/Core/Color.js 2156

An immutable Color instance initialized to CSS color #FFFAFA

#### static constant Cesium.Color.SPRINGGREEN : Color
engine/Source/Core/Color.js 2165

An immutable Color instance initialized to CSS color #00FF7F

#### static constant Cesium.Color.STEELBLUE : Color
engine/Source/Core/Color.js 2174

An immutable Color instance initialized to CSS color #4682B4

#### static constant Cesium.Color.TAN : Color
engine/Source/Core/Color.js 2183

An immutable Color instance initialized to CSS color #D2B48C

#### static constant Cesium.Color.TEAL : Color
engine/Source/Core/Color.js 2192

An immutable Color instance initialized to CSS color #008080

#### static constant Cesium.Color.THISTLE : Color
engine/Source/Core/Color.js 2201

An immutable Color instance initialized to CSS color #D8BFD8

#### static constant Cesium.Color.TOMATO : Color
engine/Source/Core/Color.js 2210

An immutable Color instance initialized to CSS color #FF6347

#### static constant Cesium.Color.TRANSPARENT : Color
engine/Source/Core/Color.js 2282

An immutable Color instance initialized to CSS transparent.

#### static constant Cesium.Color.TURQUOISE : Color
engine/Source/Core/Color.js 2219

An immutable Color instance initialized to CSS color #40E0D0

#### static constant Cesium.Color.VIOLET : Color
engine/Source/Core/Color.js 2228

An immutable Color instance initialized to CSS color #EE82EE

#### static constant Cesium.Color.WHEAT : Color
engine/Source/Core/Color.js 2237

An immutable Color instance initialized to CSS color #F5DEB3

#### static constant Cesium.Color.WHITE : Color
engine/Source/Core/Color.js 2246

An immutable Color instance initialized to CSS color #FFFFFF

#### static constant Cesium.Color.WHITESMOKE : Color
engine/Source/Core/Color.js 2255

An immutable Color instance initialized to CSS color #F5F5F5

#### static constant Cesium.Color.YELLOW : Color
engine/Source/Core/Color.js 2264

An immutable Color instance initialized to CSS color #FFFF00

#### static constant Cesium.Color.YELLOWGREEN : Color
engine/Source/Core/Color.js 2273

An immutable Color instance initialized to CSS color #9ACD32

#### alpha : number
engine/Source/Core/Color.js 63

The alpha component.

Default Value: `1.0`

#### blue : number
engine/Source/Core/Color.js 57

The blue component.

Default Value: `1.0`

#### green : number
engine/Source/Core/Color.js 51

The green component.

Default Value: `1.0`

#### red : number
engine/Source/Core/Color.js 45

The red component.

Default Value: `1.0`

### Methods

#### static Cesium.Color.add(left, right, result) → Color
engine/Source/Core/Color.js 792

Computes the componentwise sum of two Colors.

Name | Type | Description
--- | --- | ---
`left` | Color | The first Color.
`right` | Color | The second Color.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Color.bytesToRgba() → number
engine/Source/Core/Color.js 690

Converts RGBA values in bytes to a single numeric unsigned 32-bit RGBA value, using the endianness of the system.

##### Returns:

A single numeric unsigned 32-bit RGBA value.

##### See:

- Color.toRgba

#### static Cesium.Color.byteToFloat(number) → number
engine/Source/Core/Color.js 500

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.

Name | Type | Description
--- | --- | ---
`number` | number | The number to be converted.

##### Returns:

The converted number.

#### static Cesium.Color.clone(color, result) → Color
engine/Source/Core/Color.js 522

Duplicates a Color.

Name | Type | Description
--- | --- | ---
`color` | Color | The Color to duplicate.
`result` | Color | optional The object to store the result in, if undefined a new instance will be created.

##### Returns:

The modified result parameter or a new instance if result was undefined. (Returns undefined if color is undefined)

#### static Cesium.Color.divide(left, right, result) → Color
engine/Source/Core/Color.js 858

Computes the componentwise quotient of two Colors.

Name | Type | Description
--- | --- | ---
`left` | Color | The first Color.
`right` | Color | The second Color.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Color.divideByScalar(color, scalar, result) → Color
engine/Source/Core/Color.js 948

Divides the provided Color componentwise by the provided scalar.

Name | Type | Description
--- | --- | ---
`color` | Color | The Color to be divided.
`scalar` | number | The scalar to divide with.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Color.equals(left, right) → boolean
engine/Source/Core/Color.js 543

Returns true if the first Color equals the second color.

Name | Type | Description
--- | --- | ---
`left` | Color | optional The first Color to compare for equality.
`right` | Color | optional The second Color to compare for equality.

##### Returns:

`true` if the Colors are equal; otherwise, `false`.

#### static Cesium.Color.floatToByte(number) → number
engine/Source/Core/Color.js 511

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.

Name | Type | Description
--- | --- | ---
`number` | number | The number to be converted.

##### Returns:

The converted number.

#### static Cesium.Color.fromAlpha(color, alpha, result) → Color
engine/Source/Core/Color.js 129

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

Name | Type | Description
--- | --- | ---
`color` | Color | The base color
`alpha` | number | The new alpha component.
`result` | Color | optional The object onto which to store the result.

##### Returns:

The modified result parameter or a new Color instance if one was not provided.

##### Example:

    const translucentRed = Cesium.Color.fromAlpha(Cesium.Color.RED, 0.9);

#### static Cesium.Color.fromBytes(red, green, blue, alpha, result) → Color
engine/Source/Core/Color.js 101

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.

Name | Type | Default | Description
--- | --- | --- | ---
`red` | number | `255` | optional The red component.
`green` | number | `255` | optional The green component.
`blue` | number | `255` | optional The blue component.
`alpha` | number | `255` | optional The alpha component.
`result` | Color |  | optional The object onto which to store the result.

##### Returns:

The modified result parameter or a new Color instance if one was not provided.

#### static Cesium.Color.fromCartesian4(cartesian, result) → Color
engine/Source/Core/Color.js 74

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

Name | Type | Description
--- | --- | ---
`cartesian` | Cartesian4 | The source cartesian.
`result` | Color | optional The object onto which to store the result.

##### Returns:

The modified result parameter or a new Color instance if one was not provided.

#### static Cesium.Color.fromCssColorString(color, result) → Color
engine/Source/Core/Color.js 376

Creates a Color instance from a CSS color value.

Name | Type | Description
--- | --- | ---
`color` | string | The CSS color value in #rgb, #rgba, #rrggbb, #rrggbbaa, rgb(), rgba(), hsl(), or hsla() format.
`result` | Color | optional The object to store the result in, if undefined a new instance will be created.

##### Returns:

The color object, or undefined if the string was not a valid CSS color.

##### Example:

    const cesiumBlue = Cesium.Color.fromCssColorString('#67ADDF');
    const green = Cesium.Color.fromCssColorString('green');

##### See:

- CSS color values

#### static Cesium.Color.fromHsl(hue, saturation, lightness, alpha, result) → Color
engine/Source/Core/Color.js 192

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

Name | Type | Default | Description
--- | --- | --- | ---
`hue` | number | `0` | optional The hue angle 0...1
`saturation` | number | `0` | optional The saturation value 0...1
`lightness` | number | `0` | optional The lightness value 0...1
`alpha` | number | `1.0` | optional The alpha component 0...1
`result` | Color |  | optional The object to store the result in, if undefined a new instance will be created.

##### Returns:

The color object.

##### See:

- CSS color values

#### static Cesium.Color.fromRandom(options, result) → Color
engine/Source/Core/Color.js 271

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

Name | Type | Description
--- | --- | ---
`options` | object | optional Object with the following properties:
Name | Type | Default | Description
--- | --- | --- | ---
`red` | number |  | optional If specified, the red component to use instead of a randomized value.
`minimumRed` | number | `0.0` | optional The maximum red value to generate if none was specified.
`maximumRed` | number | `1.0` | optional The minimum red value to generate if none was specified.
`green` | number |  | optional If specified, the green component to use instead of a randomized value.
`minimumGreen` | number | `0.0` | optional The maximum green value to generate if none was specified.
`maximumGreen` | number | `1.0` | optional The minimum green value to generate if none was specified.
`blue` | number |  | optional If specified, the blue component to use instead of a randomized value.
`minimumBlue` | number | `0.0` | optional The maximum blue value to generate if none was specified.
`maximumBlue` | number | `1.0` | optional The minimum blue value to generate if none was specified.
`alpha` | number |  | optional If specified, the alpha component to use instead of a randomized value.
`minimumAlpha` | number | `0.0` | optional The maximum alpha value to generate if none was specified.
`maximumAlpha` | number | `1.0` | optional The minimum alpha value to generate if none was specified.
`result` | Color | optional The object to store the result in, if undefined a new instance will be created.

##### Returns:

The modified result parameter or a new instance if result was undefined.

##### Throws:

- DeveloperError : minimumRed must be less than or equal to maximumRed.
- DeveloperError : minimumGreen must be less than or equal to maximumGreen.
- DeveloperError : minimumBlue must be less than or equal to maximumBlue.
- DeveloperError : minimumAlpha must be less than or equal to maximumAlpha.

##### Example:

    //Create a completely random color
    const color = Cesium.Color.fromRandom();

    //Create a random shade of yellow.
    const color1 = Cesium.Color.fromRandom({
        red : 1.0,
        green : 1.0,
        alpha : 1.0
    });

    //Create a random bright color.
    const color2 = Cesium.Color.fromRandom({
        minimumRed : 0.75,
        minimumGreen : 0.75,
        minimumBlue : 0.75,
        alpha : 1.0
    });

#### static Cesium.Color.fromRgba(rgba, result) → Color
engine/Source/Core/Color.js 168

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

Name | Type | Description
--- | --- | ---
`rgba` | number | A single numeric unsigned 32-bit RGBA value.
`result` | Color | optional The object to store the result in, if undefined a new instance will be created.

##### Returns:

The color object.

##### Example:

    const color = Cesium.Color.fromRgba(0x67ADDFFF);

##### See:

- Color#toRgba

#### static Cesium.Color.lerp(start, end, t, result) → Color
engine/Source/Core/Color.js 903

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

Name | Type | Description
--- | --- | ---
`start` | Color | The color corresponding to t at 0.0.
`end` | Color | The color corresponding to t at 1.0.
`t` | number | The point along t at which to interpolate.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Color.mod(left, right, result) → Color
engine/Source/Core/Color.js 880

Computes the componentwise modulus of two Colors.

Name | Type | Description
--- | --- | ---
`left` | Color | The first Color.
`right` | Color | The second Color.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Color.multiply(left, right, result) → Color
engine/Source/Core/Color.js 836

Computes the componentwise product of two Colors.

Name | Type | Description
--- | --- | ---
`left` | Color | The first Color.
`right` | Color | The second Color.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Color.multiplyByScalar(color, scalar, result) → Color
engine/Source/Core/Color.js 926

Multiplies the provided Color componentwise by the provided scalar.

Name | Type | Description
--- | --- | ---
`color` | Color | The Color to be scaled.
`scalar` | number | The scalar to multiply with.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Color.pack(value, array, startingIndex) → Array.<number>
engine/Source/Core/Color.js 454

Stores the provided instance into the provided array.

Name | Type | Default | Description
--- | --- | --- | ---
`value` | Color |  | The value to pack.
`array` | Array.<number> |  | The array to pack into.
`startingIndex` | number | `0` | optional The index into the array at which to start packing the elements.

##### Returns:

The array that was packed into

#### static Cesium.Color.subtract(left, right, result) → Color
engine/Source/Core/Color.js 814

Computes the componentwise difference of two Colors.

Name | Type | Description
--- | --- | ---
`left` | Color | The first Color.
`right` | Color | The second Color.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

#### static Cesium.Color.unpack(array, startingIndex, result) → Color
engine/Source/Core/Color.js 477

Retrieves an instance from a packed array.

Name | Type | Default | Description
--- | --- | --- | ---
`array` | Array.<number> |  | The packed array.
`startingIndex` | number | `0` | optional The starting index of the element to be unpacked.
`result` | Color |  | optional The object into which to store the result.

##### Returns:

The modified result parameter or a new Color instance if one was not provided.

#### brighten(magnitude, result) → Color
engine/Source/Core/Color.js 730

Brightens this color by the provided magnitude.

Name | Type | Description
--- | --- | ---
`magnitude` | number | A positive number indicating the amount to brighten.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

##### Example:

    const brightBlue = Cesium.Color.BLUE.brighten(0.5, new Cesium.Color());

#### clone(result) → Color
engine/Source/Core/Color.js 573

Returns a duplicate of a Color instance.

Name | Type | Description
--- | --- | ---
`result` | Color | optional The object to store the result in, if undefined a new instance will be created.

##### Returns:

The modified result parameter or a new instance if result was undefined.

#### darken(magnitude, result) → Color
engine/Source/Core/Color.js 755

Darkens this color by the provided magnitude.

Name | Type | Description
--- | --- | ---
`magnitude` | number | A positive number indicating the amount to darken.
`result` | Color | The object onto which to store the result.

##### Returns:

The modified result parameter.

##### Example:

    const darkBlue = Cesium.Color.BLUE.darken(0.5, new Cesium.Color());

#### equals(other) → boolean
engine/Source/Core/Color.js 583

Returns true if this Color equals other.

Name | Type | Description
--- | --- | ---
`other` | Color | optional The Color to compare for equality.

##### Returns:

`true` if the Colors are equal; otherwise, `false`.

#### equalsEpsilon(other, epsilon) → boolean
engine/Source/Core/Color.js 594

Returns `true` if this Color equals other componentwise within the specified epsilon.

Name | Type | Default | Description
--- | --- | --- | ---
`other` | Color |  | The Color to compare for equality.
`epsilon` | number | `0.0` | optional The epsilon to use for equality testing.

##### Returns:

`true` if the Colors are equal within the specified epsilon; otherwise, `false`.

#### toBytes(result) → Array.<number>
engine/Source/Core/Color.js 666

Converts this color to an array of red, green, blue, and alpha values that are in the range of 0 to 255.

Name | Type | Description
--- | --- | ---
`result` | Array.<number> | optional The array to store the result in, if undefined a new instance will be created.

##### Returns:

The modified result parameter or a new instance if result was undefined.

#### toCssColorString() → string
engine/Source/Core/Color.js 621

Creates a string containing the CSS color value for this color.

##### Returns:

The CSS equivalent of this color.

##### See:

- CSS RGB or RGBA color values

#### toCssHexString() → string
engine/Source/Core/Color.js 636

Creates a string containing CSS hex string color value for this color.

##### Returns:

The CSS hex string equivalent of this color.

#### toRgba() → number
engine/Source/Core/Color.js 711

Converts this color to a single numeric unsigned 32-bit RGBA value, using the endianness of the system.

##### Returns:

A single numeric unsigned 32-bit RGBA value.

##### Example:

    const rgba = Cesium.Color.BLUE.toRgba();

##### See:

- Color.fromRgba

#### toString() → string
engine/Source/Core/Color.js 610

Creates a string representing this Color in the format '(red, green, blue, alpha)'.

##### Returns:

A string representing this Color in the format '(red, green, blue, alpha)'.

#### withAlpha(alpha, result) → Color
engine/Source/Core/Color.js 780

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

Name | Type | Description
--- | --- | ---
`alpha` | number | The new alpha component.
`result` | Color | optional The object onto which to store the result.

##### Returns:

The modified result parameter or a new Color instance if one was not provided.

##### Example:

    const translucentRed = Cesium.Color.RED.withAlpha(0.9);

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.