Skip to content

KBE3D / KBCore / Cesium / Color

类: Color

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

参数

The red component.

参数

The green component.

参数

The blue component.

参数

The alpha component.

属性

packedLength

static packedLength: number

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


ALICEBLUE

readonly static ALICEBLUE: Color

An immutable Color instance initialized to CSS color #F0F8FF <span class="colorSwath" style="background: #F0F8FF;"></span>


ANTIQUEWHITE

readonly static ANTIQUEWHITE: Color

An immutable Color instance initialized to CSS color #FAEBD7 <span class="colorSwath" style="background: #FAEBD7;"></span>


AQUA

readonly static AQUA: Color

An immutable Color instance initialized to CSS color #00FFFF <span class="colorSwath" style="background: #00FFFF;"></span>


AQUAMARINE

readonly static AQUAMARINE: Color

An immutable Color instance initialized to CSS color #7FFFD4 <span class="colorSwath" style="background: #7FFFD4;"></span>


AZURE

readonly static AZURE: Color

An immutable Color instance initialized to CSS color #F0FFFF <span class="colorSwath" style="background: #F0FFFF;"></span>


BEIGE

readonly static BEIGE: Color

An immutable Color instance initialized to CSS color #F5F5DC <span class="colorSwath" style="background: #F5F5DC;"></span>


BISQUE

readonly static BISQUE: Color

An immutable Color instance initialized to CSS color #FFE4C4 <span class="colorSwath" style="background: #FFE4C4;"></span>


BLACK

readonly static BLACK: Color

An immutable Color instance initialized to CSS color #000000 <span class="colorSwath" style="background: #000000;"></span>


BLANCHEDALMOND

readonly static BLANCHEDALMOND: Color

An immutable Color instance initialized to CSS color #FFEBCD <span class="colorSwath" style="background: #FFEBCD;"></span>


BLUE

readonly static BLUE: Color

An immutable Color instance initialized to CSS color #0000FF <span class="colorSwath" style="background: #0000FF;"></span>


BLUEVIOLET

readonly static BLUEVIOLET: Color

An immutable Color instance initialized to CSS color #8A2BE2 <span class="colorSwath" style="background: #8A2BE2;"></span>


BROWN

readonly static BROWN: Color

An immutable Color instance initialized to CSS color #A52A2A <span class="colorSwath" style="background: #A52A2A;"></span>


BURLYWOOD

readonly static BURLYWOOD: Color

An immutable Color instance initialized to CSS color #DEB887 <span class="colorSwath" style="background: #DEB887;"></span>


CADETBLUE

readonly static CADETBLUE: Color

An immutable Color instance initialized to CSS color #5F9EA0 <span class="colorSwath" style="background: #5F9EA0;"></span>


CHARTREUSE

readonly static CHARTREUSE: Color

An immutable Color instance initialized to CSS color #7FFF00 <span class="colorSwath" style="background: #7FFF00;"></span>


CHOCOLATE

readonly static CHOCOLATE: Color

An immutable Color instance initialized to CSS color #D2691E <span class="colorSwath" style="background: #D2691E;"></span>


CORAL

readonly static CORAL: Color

An immutable Color instance initialized to CSS color #FF7F50 <span class="colorSwath" style="background: #FF7F50;"></span>


CORNFLOWERBLUE

readonly static CORNFLOWERBLUE: Color

An immutable Color instance initialized to CSS color #6495ED <span class="colorSwath" style="background: #6495ED;"></span>


CORNSILK

readonly static CORNSILK: Color

An immutable Color instance initialized to CSS color #FFF8DC <span class="colorSwath" style="background: #FFF8DC;"></span>


CRIMSON

readonly static CRIMSON: Color

An immutable Color instance initialized to CSS color #DC143C <span class="colorSwath" style="background: #DC143C;"></span>


CYAN

readonly static CYAN: Color

An immutable Color instance initialized to CSS color #00FFFF <span class="colorSwath" style="background: #00FFFF;"></span>


DARKBLUE

readonly static DARKBLUE: Color

An immutable Color instance initialized to CSS color #00008B <span class="colorSwath" style="background: #00008B;"></span>


DARKCYAN

readonly static DARKCYAN: Color

An immutable Color instance initialized to CSS color #008B8B <span class="colorSwath" style="background: #008B8B;"></span>


DARKGOLDENROD

readonly static DARKGOLDENROD: Color

An immutable Color instance initialized to CSS color #B8860B <span class="colorSwath" style="background: #B8860B;"></span>


DARKGRAY

readonly static DARKGRAY: Color

An immutable Color instance initialized to CSS color #A9A9A9 <span class="colorSwath" style="background: #A9A9A9;"></span>


DARKGREEN

readonly static DARKGREEN: Color

An immutable Color instance initialized to CSS color #006400 <span class="colorSwath" style="background: #006400;"></span>


DARKGREY

readonly static DARKGREY: Color

An immutable Color instance initialized to CSS color #A9A9A9 <span class="colorSwath" style="background: #A9A9A9;"></span>


DARKKHAKI

readonly static DARKKHAKI: Color

An immutable Color instance initialized to CSS color #BDB76B <span class="colorSwath" style="background: #BDB76B;"></span>


DARKMAGENTA

readonly static DARKMAGENTA: Color

An immutable Color instance initialized to CSS color #8B008B <span class="colorSwath" style="background: #8B008B;"></span>


DARKOLIVEGREEN

readonly static DARKOLIVEGREEN: Color

An immutable Color instance initialized to CSS color #556B2F <span class="colorSwath" style="background: #556B2F;"></span>


DARKORANGE

readonly static DARKORANGE: Color

An immutable Color instance initialized to CSS color #FF8C00 <span class="colorSwath" style="background: #FF8C00;"></span>


DARKORCHID

readonly static DARKORCHID: Color

An immutable Color instance initialized to CSS color #9932CC <span class="colorSwath" style="background: #9932CC;"></span>


DARKRED

readonly static DARKRED: Color

An immutable Color instance initialized to CSS color #8B0000 <span class="colorSwath" style="background: #8B0000;"></span>


DARKSALMON

readonly static DARKSALMON: Color

An immutable Color instance initialized to CSS color #E9967A <span class="colorSwath" style="background: #E9967A;"></span>


DARKSEAGREEN

readonly static DARKSEAGREEN: Color

An immutable Color instance initialized to CSS color #8FBC8F <span class="colorSwath" style="background: #8FBC8F;"></span>


DARKSLATEBLUE

readonly static DARKSLATEBLUE: Color

An immutable Color instance initialized to CSS color #483D8B <span class="colorSwath" style="background: #483D8B;"></span>


DARKSLATEGRAY

readonly static DARKSLATEGRAY: Color

An immutable Color instance initialized to CSS color #2F4F4F <span class="colorSwath" style="background: #2F4F4F;"></span>


DARKSLATEGREY

readonly static DARKSLATEGREY: Color

An immutable Color instance initialized to CSS color #2F4F4F <span class="colorSwath" style="background: #2F4F4F;"></span>


DARKTURQUOISE

readonly static DARKTURQUOISE: Color

An immutable Color instance initialized to CSS color #00CED1 <span class="colorSwath" style="background: #00CED1;"></span>


DARKVIOLET

readonly static DARKVIOLET: Color

An immutable Color instance initialized to CSS color #9400D3 <span class="colorSwath" style="background: #9400D3;"></span>


DEEPPINK

readonly static DEEPPINK: Color

An immutable Color instance initialized to CSS color #FF1493 <span class="colorSwath" style="background: #FF1493;"></span>


DEEPSKYBLUE

readonly static DEEPSKYBLUE: Color

An immutable Color instance initialized to CSS color #00BFFF <span class="colorSwath" style="background: #00BFFF;"></span>


DIMGRAY

readonly static DIMGRAY: Color

An immutable Color instance initialized to CSS color #696969 <span class="colorSwath" style="background: #696969;"></span>


DIMGREY

readonly static DIMGREY: Color

An immutable Color instance initialized to CSS color #696969 <span class="colorSwath" style="background: #696969;"></span>


DODGERBLUE

readonly static DODGERBLUE: Color

An immutable Color instance initialized to CSS color #1E90FF <span class="colorSwath" style="background: #1E90FF;"></span>


FIREBRICK

readonly static FIREBRICK: Color

An immutable Color instance initialized to CSS color #B22222 <span class="colorSwath" style="background: #B22222;"></span>


FLORALWHITE

readonly static FLORALWHITE: Color

An immutable Color instance initialized to CSS color #FFFAF0 <span class="colorSwath" style="background: #FFFAF0;"></span>


FORESTGREEN

readonly static FORESTGREEN: Color

An immutable Color instance initialized to CSS color #228B22 <span class="colorSwath" style="background: #228B22;"></span>


FUCHSIA

readonly static FUCHSIA: Color

An immutable Color instance initialized to CSS color #FF00FF <span class="colorSwath" style="background: #FF00FF;"></span>


GAINSBORO

readonly static GAINSBORO: Color

An immutable Color instance initialized to CSS color #DCDCDC <span class="colorSwath" style="background: #DCDCDC;"></span>


GHOSTWHITE

readonly static GHOSTWHITE: Color

An immutable Color instance initialized to CSS color #F8F8FF <span class="colorSwath" style="background: #F8F8FF;"></span>


GOLD

readonly static GOLD: Color

An immutable Color instance initialized to CSS color #FFD700 <span class="colorSwath" style="background: #FFD700;"></span>


GOLDENROD

readonly static GOLDENROD: Color

An immutable Color instance initialized to CSS color #DAA520 <span class="colorSwath" style="background: #DAA520;"></span>


GRAY

readonly static GRAY: Color

An immutable Color instance initialized to CSS color #808080 <span class="colorSwath" style="background: #808080;"></span>


GREEN

readonly static GREEN: Color

An immutable Color instance initialized to CSS color #008000 <span class="colorSwath" style="background: #008000;"></span>


GREENYELLOW

readonly static GREENYELLOW: Color

An immutable Color instance initialized to CSS color #ADFF2F <span class="colorSwath" style="background: #ADFF2F;"></span>


GREY

readonly static GREY: Color

An immutable Color instance initialized to CSS color #808080 <span class="colorSwath" style="background: #808080;"></span>


HONEYDEW

readonly static HONEYDEW: Color

An immutable Color instance initialized to CSS color #F0FFF0 <span class="colorSwath" style="background: #F0FFF0;"></span>


HOTPINK

readonly static HOTPINK: Color

An immutable Color instance initialized to CSS color #FF69B4 <span class="colorSwath" style="background: #FF69B4;"></span>


INDIANRED

readonly static INDIANRED: Color

An immutable Color instance initialized to CSS color #CD5C5C <span class="colorSwath" style="background: #CD5C5C;"></span>


INDIGO

readonly static INDIGO: Color

An immutable Color instance initialized to CSS color #4B0082 <span class="colorSwath" style="background: #4B0082;"></span>


IVORY

readonly static IVORY: Color

An immutable Color instance initialized to CSS color #FFFFF0 <span class="colorSwath" style="background: #FFFFF0;"></span>


KHAKI

readonly static KHAKI: Color

An immutable Color instance initialized to CSS color #F0E68C <span class="colorSwath" style="background: #F0E68C;"></span>


LAVENDER

readonly static LAVENDER: Color

An immutable Color instance initialized to CSS color #E6E6FA <span class="colorSwath" style="background: #E6E6FA;"></span>


LAVENDAR_BLUSH

readonly static LAVENDAR_BLUSH: Color

An immutable Color instance initialized to CSS color #FFF0F5 <span class="colorSwath" style="background: #FFF0F5;"></span>


LAWNGREEN

readonly static LAWNGREEN: Color

An immutable Color instance initialized to CSS color #7CFC00 <span class="colorSwath" style="background: #7CFC00;"></span>


LEMONCHIFFON

readonly static LEMONCHIFFON: Color

An immutable Color instance initialized to CSS color #FFFACD <span class="colorSwath" style="background: #FFFACD;"></span>


LIGHTBLUE

readonly static LIGHTBLUE: Color

An immutable Color instance initialized to CSS color #ADD8E6 <span class="colorSwath" style="background: #ADD8E6;"></span>


LIGHTCORAL

readonly static LIGHTCORAL: Color

An immutable Color instance initialized to CSS color #F08080 <span class="colorSwath" style="background: #F08080;"></span>


LIGHTCYAN

readonly static LIGHTCYAN: Color

An immutable Color instance initialized to CSS color #E0FFFF <span class="colorSwath" style="background: #E0FFFF;"></span>


LIGHTGOLDENRODYELLOW

readonly static LIGHTGOLDENRODYELLOW: Color

An immutable Color instance initialized to CSS color #FAFAD2 <span class="colorSwath" style="background: #FAFAD2;"></span>


LIGHTGRAY

readonly static LIGHTGRAY: Color

An immutable Color instance initialized to CSS color #D3D3D3 <span class="colorSwath" style="background: #D3D3D3;"></span>


LIGHTGREEN

readonly static LIGHTGREEN: Color

An immutable Color instance initialized to CSS color #90EE90 <span class="colorSwath" style="background: #90EE90;"></span>


LIGHTGREY

readonly static LIGHTGREY: Color

An immutable Color instance initialized to CSS color #D3D3D3 <span class="colorSwath" style="background: #D3D3D3;"></span>


LIGHTPINK

readonly static LIGHTPINK: Color

An immutable Color instance initialized to CSS color #FFB6C1 <span class="colorSwath" style="background: #FFB6C1;"></span>


LIGHTSEAGREEN

readonly static LIGHTSEAGREEN: Color

An immutable Color instance initialized to CSS color #20B2AA <span class="colorSwath" style="background: #20B2AA;"></span>


LIGHTSKYBLUE

readonly static LIGHTSKYBLUE: Color

An immutable Color instance initialized to CSS color #87CEFA <span class="colorSwath" style="background: #87CEFA;"></span>


LIGHTSLATEGRAY

readonly static LIGHTSLATEGRAY: Color

An immutable Color instance initialized to CSS color #778899 <span class="colorSwath" style="background: #778899;"></span>


LIGHTSLATEGREY

readonly static LIGHTSLATEGREY: Color

An immutable Color instance initialized to CSS color #778899 <span class="colorSwath" style="background: #778899;"></span>


LIGHTSTEELBLUE

readonly static LIGHTSTEELBLUE: Color

An immutable Color instance initialized to CSS color #B0C4DE <span class="colorSwath" style="background: #B0C4DE;"></span>


LIGHTYELLOW

readonly static LIGHTYELLOW: Color

An immutable Color instance initialized to CSS color #FFFFE0 <span class="colorSwath" style="background: #FFFFE0;"></span>


LIME

readonly static LIME: Color

An immutable Color instance initialized to CSS color #00FF00 <span class="colorSwath" style="background: #00FF00;"></span>


LIMEGREEN

readonly static LIMEGREEN: Color

An immutable Color instance initialized to CSS color #32CD32 <span class="colorSwath" style="background: #32CD32;"></span>


LINEN

readonly static LINEN: Color

An immutable Color instance initialized to CSS color #FAF0E6 <span class="colorSwath" style="background: #FAF0E6;"></span>


MAGENTA

readonly static MAGENTA: Color

An immutable Color instance initialized to CSS color #FF00FF <span class="colorSwath" style="background: #FF00FF;"></span>


MAROON

readonly static MAROON: Color

An immutable Color instance initialized to CSS color #800000 <span class="colorSwath" style="background: #800000;"></span>


MEDIUMAQUAMARINE

readonly static MEDIUMAQUAMARINE: Color

An immutable Color instance initialized to CSS color #66CDAA <span class="colorSwath" style="background: #66CDAA;"></span>


MEDIUMBLUE

readonly static MEDIUMBLUE: Color

An immutable Color instance initialized to CSS color #0000CD <span class="colorSwath" style="background: #0000CD;"></span>


MEDIUMORCHID

readonly static MEDIUMORCHID: Color

An immutable Color instance initialized to CSS color #BA55D3 <span class="colorSwath" style="background: #BA55D3;"></span>


MEDIUMPURPLE

readonly static MEDIUMPURPLE: Color

An immutable Color instance initialized to CSS color #9370DB <span class="colorSwath" style="background: #9370DB;"></span>


MEDIUMSEAGREEN

readonly static MEDIUMSEAGREEN: Color

An immutable Color instance initialized to CSS color #3CB371 <span class="colorSwath" style="background: #3CB371;"></span>


MEDIUMSLATEBLUE

readonly static MEDIUMSLATEBLUE: Color

An immutable Color instance initialized to CSS color #7B68EE <span class="colorSwath" style="background: #7B68EE;"></span>


MEDIUMSPRINGGREEN

readonly static MEDIUMSPRINGGREEN: Color

An immutable Color instance initialized to CSS color #00FA9A <span class="colorSwath" style="background: #00FA9A;"></span>


MEDIUMTURQUOISE

readonly static MEDIUMTURQUOISE: Color

An immutable Color instance initialized to CSS color #48D1CC <span class="colorSwath" style="background: #48D1CC;"></span>


MEDIUMVIOLETRED

readonly static MEDIUMVIOLETRED: Color

An immutable Color instance initialized to CSS color #C71585 <span class="colorSwath" style="background: #C71585;"></span>


MIDNIGHTBLUE

readonly static MIDNIGHTBLUE: Color

An immutable Color instance initialized to CSS color #191970 <span class="colorSwath" style="background: #191970;"></span>


MINTCREAM

readonly static MINTCREAM: Color

An immutable Color instance initialized to CSS color #F5FFFA <span class="colorSwath" style="background: #F5FFFA;"></span>


MISTYROSE

readonly static MISTYROSE: Color

An immutable Color instance initialized to CSS color #FFE4E1 <span class="colorSwath" style="background: #FFE4E1;"></span>


MOCCASIN

readonly static MOCCASIN: Color

An immutable Color instance initialized to CSS color #FFE4B5 <span class="colorSwath" style="background: #FFE4B5;"></span>


readonly static NAVAJOWHITE: Color

An immutable Color instance initialized to CSS color #FFDEAD <span class="colorSwath" style="background: #FFDEAD;"></span>


readonly static NAVY: Color

An immutable Color instance initialized to CSS color #000080 <span class="colorSwath" style="background: #000080;"></span>


OLDLACE

readonly static OLDLACE: Color

An immutable Color instance initialized to CSS color #FDF5E6 <span class="colorSwath" style="background: #FDF5E6;"></span>


OLIVE

readonly static OLIVE: Color

An immutable Color instance initialized to CSS color #808000 <span class="colorSwath" style="background: #808000;"></span>


OLIVEDRAB

readonly static OLIVEDRAB: Color

An immutable Color instance initialized to CSS color #6B8E23 <span class="colorSwath" style="background: #6B8E23;"></span>


ORANGE

readonly static ORANGE: Color

An immutable Color instance initialized to CSS color #FFA500 <span class="colorSwath" style="background: #FFA500;"></span>


ORANGERED

readonly static ORANGERED: Color

An immutable Color instance initialized to CSS color #FF4500 <span class="colorSwath" style="background: #FF4500;"></span>


ORCHID

readonly static ORCHID: Color

An immutable Color instance initialized to CSS color #DA70D6 <span class="colorSwath" style="background: #DA70D6;"></span>


PALEGOLDENROD

readonly static PALEGOLDENROD: Color

An immutable Color instance initialized to CSS color #EEE8AA <span class="colorSwath" style="background: #EEE8AA;"></span>


PALEGREEN

readonly static PALEGREEN: Color

An immutable Color instance initialized to CSS color #98FB98 <span class="colorSwath" style="background: #98FB98;"></span>


PALETURQUOISE

readonly static PALETURQUOISE: Color

An immutable Color instance initialized to CSS color #AFEEEE <span class="colorSwath" style="background: #AFEEEE;"></span>


PALEVIOLETRED

readonly static PALEVIOLETRED: Color

An immutable Color instance initialized to CSS color #DB7093 <span class="colorSwath" style="background: #DB7093;"></span>


PAPAYAWHIP

readonly static PAPAYAWHIP: Color

An immutable Color instance initialized to CSS color #FFEFD5 <span class="colorSwath" style="background: #FFEFD5;"></span>


PEACHPUFF

readonly static PEACHPUFF: Color

An immutable Color instance initialized to CSS color #FFDAB9 <span class="colorSwath" style="background: #FFDAB9;"></span>


PERU

readonly static PERU: Color

An immutable Color instance initialized to CSS color #CD853F <span class="colorSwath" style="background: #CD853F;"></span>


PINK

readonly static PINK: Color

An immutable Color instance initialized to CSS color #FFC0CB <span class="colorSwath" style="background: #FFC0CB;"></span>


PLUM

readonly static PLUM: Color

An immutable Color instance initialized to CSS color #DDA0DD <span class="colorSwath" style="background: #DDA0DD;"></span>


POWDERBLUE

readonly static POWDERBLUE: Color

An immutable Color instance initialized to CSS color #B0E0E6 <span class="colorSwath" style="background: #B0E0E6;"></span>


PURPLE

readonly static PURPLE: Color

An immutable Color instance initialized to CSS color #800080 <span class="colorSwath" style="background: #800080;"></span>


RED

readonly static RED: Color

An immutable Color instance initialized to CSS color #FF0000 <span class="colorSwath" style="background: #FF0000;"></span>


ROSYBROWN

readonly static ROSYBROWN: Color

An immutable Color instance initialized to CSS color #BC8F8F <span class="colorSwath" style="background: #BC8F8F;"></span>


ROYALBLUE

readonly static ROYALBLUE: Color

An immutable Color instance initialized to CSS color #4169E1 <span class="colorSwath" style="background: #4169E1;"></span>


SADDLEBROWN

readonly static SADDLEBROWN: Color

An immutable Color instance initialized to CSS color #8B4513 <span class="colorSwath" style="background: #8B4513;"></span>


SALMON

readonly static SALMON: Color

An immutable Color instance initialized to CSS color #FA8072 <span class="colorSwath" style="background: #FA8072;"></span>


SANDYBROWN

readonly static SANDYBROWN: Color

An immutable Color instance initialized to CSS color #F4A460 <span class="colorSwath" style="background: #F4A460;"></span>


SEAGREEN

readonly static SEAGREEN: Color

An immutable Color instance initialized to CSS color #2E8B57 <span class="colorSwath" style="background: #2E8B57;"></span>


SEASHELL

readonly static SEASHELL: Color

An immutable Color instance initialized to CSS color #FFF5EE <span class="colorSwath" style="background: #FFF5EE;"></span>


SIENNA

readonly static SIENNA: Color

An immutable Color instance initialized to CSS color #A0522D <span class="colorSwath" style="background: #A0522D;"></span>


SILVER

readonly static SILVER: Color

An immutable Color instance initialized to CSS color #C0C0C0 <span class="colorSwath" style="background: #C0C0C0;"></span>


SKYBLUE

readonly static SKYBLUE: Color

An immutable Color instance initialized to CSS color #87CEEB <span class="colorSwath" style="background: #87CEEB;"></span>


SLATEBLUE

readonly static SLATEBLUE: Color

An immutable Color instance initialized to CSS color #6A5ACD <span class="colorSwath" style="background: #6A5ACD;"></span>


SLATEGRAY

readonly static SLATEGRAY: Color

An immutable Color instance initialized to CSS color #708090 <span class="colorSwath" style="background: #708090;"></span>


SLATEGREY

readonly static SLATEGREY: Color

An immutable Color instance initialized to CSS color #708090 <span class="colorSwath" style="background: #708090;"></span>


SNOW

readonly static SNOW: Color

An immutable Color instance initialized to CSS color #FFFAFA <span class="colorSwath" style="background: #FFFAFA;"></span>


SPRINGGREEN

readonly static SPRINGGREEN: Color

An immutable Color instance initialized to CSS color #00FF7F <span class="colorSwath" style="background: #00FF7F;"></span>


STEELBLUE

readonly static STEELBLUE: Color

An immutable Color instance initialized to CSS color #4682B4 <span class="colorSwath" style="background: #4682B4;"></span>


TAN

readonly static TAN: Color

An immutable Color instance initialized to CSS color #D2B48C <span class="colorSwath" style="background: #D2B48C;"></span>


TEAL

readonly static TEAL: Color

An immutable Color instance initialized to CSS color #008080 <span class="colorSwath" style="background: #008080;"></span>


THISTLE

readonly static THISTLE: Color

An immutable Color instance initialized to CSS color #D8BFD8 <span class="colorSwath" style="background: #D8BFD8;"></span>


TOMATO

readonly static TOMATO: Color

An immutable Color instance initialized to CSS color #FF6347 <span class="colorSwath" style="background: #FF6347;"></span>


TURQUOISE

readonly static TURQUOISE: Color

An immutable Color instance initialized to CSS color #40E0D0 <span class="colorSwath" style="background: #40E0D0;"></span>


VIOLET

readonly static VIOLET: Color

An immutable Color instance initialized to CSS color #EE82EE <span class="colorSwath" style="background: #EE82EE;"></span>


WHEAT

readonly static WHEAT: Color

An immutable Color instance initialized to CSS color #F5DEB3 <span class="colorSwath" style="background: #F5DEB3;"></span>


WHITE

readonly static WHITE: Color

An immutable Color instance initialized to CSS color #FFFFFF <span class="colorSwath" style="background: #FFFFFF;"></span>


WHITESMOKE

readonly static WHITESMOKE: Color

An immutable Color instance initialized to CSS color #F5F5F5 <span class="colorSwath" style="background: #F5F5F5;"></span>


YELLOW

readonly static YELLOW: Color

An immutable Color instance initialized to CSS color #FFFF00 <span class="colorSwath" style="background: #FFFF00;"></span>


YELLOWGREEN

readonly static YELLOWGREEN: Color

An immutable Color instance initialized to CSS color #9ACD32 <span class="colorSwath" style="background: #9ACD32;"></span>


TRANSPARENT

readonly static TRANSPARENT: Color

An immutable Color instance initialized to CSS transparent. <span class="colorSwath" style="background: transparent;"></span>


red

red: number

The red component.


green

green: number

The green component.


blue

blue: number

The blue component.


alpha

alpha: number

The alpha component.

方法

fromCartesian4()

static fromCartesian4(cartesian: Cartesian4, result?: Color): Color

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

参数

cartesian

Cartesian4

The source cartesian.

result?

Color

The object onto which to store the result.

返回

Color

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


fromBytes()

static fromBytes(red?: number, green?: number, blue?: number, alpha?: number, result?: Color): 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.

参数

red?

number

The red component.

green?

number

The green component.

blue?

number

The blue component.

alpha?

number

The alpha component.

result?

Color

The object onto which to store the result.

返回

Color

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


fromAlpha()

static fromAlpha(color: Color, alpha: number, result?: Color): Color

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

参数

color

Color

The base color

alpha

number

The new alpha component.

result?

Color

The object onto which to store the result.

返回

Color

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

示例

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

fromRgba()

static fromRgba(rgba: number, result?: Color): Color

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

参数

rgba

number

A single numeric unsigned 32-bit RGBA value.

result?

Color

The object to store the result in, if undefined a new instance will be created.

返回

Color

The color object.

示例

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

fromHsl()

static fromHsl(hue?: number, saturation?: number, lightness?: number, alpha?: number, result?: Color): Color

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

参数

hue?

number

The hue angle 0...1

saturation?

number

The saturation value 0...1

lightness?

number

The lightness value 0...1

alpha?

number

The alpha component 0...1

result?

Color

The object to store the result in, if undefined a new instance will be created.

返回

Color

The color object.


fromRandom()

static fromRandom(options?: { red?: number; minimumRed?: number; maximumRed?: number; green?: number; minimumGreen?: number; maximumGreen?: number; blue?: number; minimumBlue?: number; maximumBlue?: number; alpha?: number; minimumAlpha?: number; maximumAlpha?: number; }, result?: Color): 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.

参数

options?

Object with the following properties:

red?

number

If specified, the red component to use instead of a randomized value.

minimumRed?

number

The maximum red value to generate if none was specified.

maximumRed?

number

The minimum red value to generate if none was specified.

green?

number

If specified, the green component to use instead of a randomized value.

minimumGreen?

number

The maximum green value to generate if none was specified.

maximumGreen?

number

The minimum green value to generate if none was specified.

blue?

number

If specified, the blue component to use instead of a randomized value.

minimumBlue?

number

The maximum blue value to generate if none was specified.

maximumBlue?

number

The minimum blue value to generate if none was specified.

alpha?

number

If specified, the alpha component to use instead of a randomized value.

minimumAlpha?

number

The maximum alpha value to generate if none was specified.

maximumAlpha?

number

The minimum alpha value to generate if none was specified.

result?

Color

The object to store the result in, if undefined a new instance will be created.

返回

Color

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

示例

ts
//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
});

fromCssColorString()

static fromCssColorString(color: string, result?: Color): Color

Creates a Color instance from a CSS color value.

参数

color

string

The CSS color value in #rgb, #rgba, #rrggbb, #rrggbbaa, rgb(), rgba(), hsl(), or hsla() format.

result?

Color

The object to store the result in, if undefined a new instance will be created.

返回

Color

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

示例

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

pack()

static pack(value: Color, array: number[], startingIndex?: number): number[]

Stores the provided instance into the provided array.

参数

value

Color

The value to pack.

array

number[]

The array to pack into.

startingIndex?

number

The index into the array at which to start packing the elements.

返回

number[]

The array that was packed into


unpack()

static unpack(array: number[], startingIndex?: number, result?: Color): Color

Retrieves an instance from a packed array.

参数

array

number[]

The packed array.

startingIndex?

number

The starting index of the element to be unpacked.

result?

Color

The object into which to store the result.

返回

Color

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


byteToFloat()

static byteToFloat(number: number): number

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.

参数

number

number

The number to be converted.

返回

number

The converted number.


floatToByte()

static floatToByte(number: number): number

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.

参数

number

number

The number to be converted.

返回

number

The converted number.


clone()

static clone(color: Color, result?: Color): Color

Duplicates a Color.

参数

color

Color

The Color to duplicate.

result?

Color

The object to store the result in, if undefined a new instance will be created.

返回

Color

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


equals()

static equals(left?: Color, right?: Color): boolean

Returns true if the first Color equals the second color.

参数

left?

Color

The first Color to compare for equality.

Color

The second Color to compare for equality.

返回

boolean

true if the Colors are equal; otherwise, false.


bytesToRgba()

static bytesToRgba(): number

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

返回

number

A single numeric unsigned 32-bit RGBA value.


add()

static add(left: Color, right: Color, result: Color): Color

Computes the componentwise sum of two Colors.

参数

left

Color

The first Color.

right

Color

The second Color.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.


subtract()

static subtract(left: Color, right: Color, result: Color): Color

Computes the componentwise difference of two Colors.

参数

left

Color

The first Color.

right

Color

The second Color.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.


multiply()

static multiply(left: Color, right: Color, result: Color): Color

Computes the componentwise product of two Colors.

参数

left

Color

The first Color.

right

Color

The second Color.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.


divide()

static divide(left: Color, right: Color, result: Color): Color

Computes the componentwise quotient of two Colors.

参数

left

Color

The first Color.

right

Color

The second Color.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.


mod()

static mod(left: Color, right: Color, result: Color): Color

Computes the componentwise modulus of two Colors.

参数

left

Color

The first Color.

right

Color

The second Color.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.


lerp()

static lerp(start: Color, end: Color, t: number, result: Color): Color

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

参数

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.

返回

Color

The modified result parameter.


multiplyByScalar()

static multiplyByScalar(color: Color, scalar: number, result: Color): Color

Multiplies the provided Color componentwise by the provided scalar.

参数

color

Color

The Color to be scaled.

scalar

number

The scalar to multiply with.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.


divideByScalar()

static divideByScalar(color: Color, scalar: number, result: Color): Color

Divides the provided Color componentwise by the provided scalar.

参数

color

Color

The Color to be divided.

scalar

number

The scalar to divide with.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.


clone()

clone(result?: Color): Color

Returns a duplicate of a Color instance.

参数

result?

Color

The object to store the result in, if undefined a new instance will be created.

返回

Color

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


equals()

equals(other?: Color): boolean

Returns true if this Color equals other.

参数

other?

Color

The Color to compare for equality.

返回

boolean

true if the Colors are equal; otherwise, false.


equalsEpsilon()

equalsEpsilon(other: Color, epsilon?: number): boolean

Returns <code>true</code> if this Color equals other componentwise within the specified epsilon.

参数

other

Color

The Color to compare for equality.

epsilon?

number

The epsilon to use for equality testing.

返回

boolean

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


toString()

toString(): string

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

返回

string

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


toCssColorString()

toCssColorString(): string

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

返回

string

The CSS equivalent of this color.


toCssHexString()

toCssHexString(): string

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

返回

string

The CSS hex string equivalent of this color.


toBytes()

toBytes(result?: number[]): number[]

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

参数

result?

number[]

The array to store the result in, if undefined a new instance will be created.

返回

number[]

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


toRgba()

toRgba(): number

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

返回

number

A single numeric unsigned 32-bit RGBA value.

示例

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

brighten()

brighten(magnitude: number, result: Color): Color

Brightens this color by the provided magnitude.

参数

magnitude

number

A positive number indicating the amount to brighten.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.

示例

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

darken()

darken(magnitude: number, result: Color): Color

Darkens this color by the provided magnitude.

参数

magnitude

number

A positive number indicating the amount to darken.

result

Color

The object onto which to store the result.

返回

Color

The modified result parameter.

示例

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

withAlpha()

withAlpha(alpha: number, result?: Color): Color

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

参数

alpha

number

The new alpha component.

result?

Color

The object onto which to store the result.

返回

Color

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

示例

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

构造函数

构造函数

new Color(red?: number, green?: number, blue?: number, alpha?: number): Color

参数

red?

number

green?

number

blue?

number

alpha?

number

返回

Color

KBE3D @3.0.0 Copyright © 2024-present KBE3D