Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Color

Describes a color with red, green, blue and alpha channel.

Hierarchy

  • Color

Implements

Index

Constructors

constructor

  • new Color(r: number, g: number, b: number, a: number): Color
  • Initializes a new instance of the Color class.

    Parameters

    • r: number

      The red channel

    • g: number

      The green channel

    • b: number

      The blue channel

    • a: number

      The alpha channel

    Returns Color

Properties

a

a: number

Gets or sets the alpha channel in a range of [0..255], where 0 is completely translucent and 255 is opaque.

b

b: number

Gets or sets the blue channel in a range of [0..255].

g

g: number

Gets or sets the green channel in a range of [0..255].

r

r: number

Gets or sets the red channel in a range of [0..255].

Accessors

Static aliceBlue

  • Returns Color

Static antiqueWhite

  • get antiqueWhite(): Color
  • Returns Color

Static aqua

  • Returns Color

Static aquamarine

  • get aquamarine(): Color
  • Returns Color

Static azure

  • Returns Color

Static beige

  • Returns Color

Static bisque

  • Returns Color

Static black

  • Returns Color

Static blanchedAlmond

  • get blanchedAlmond(): Color
  • Returns Color

Static blue

  • Returns Color

Static blueViolet

  • get blueViolet(): Color
  • Returns Color

Static brown

  • Returns Color

Static burlyWood

  • Returns Color

Static cadetBlue

  • Returns Color

Static chartreuse

  • get chartreuse(): Color
  • Returns Color

Static chocolate

  • Returns Color

Static coral

  • Returns Color

Static cornflowerBlue

  • get cornflowerBlue(): Color
  • Returns Color

Static cornsilk

  • Returns Color

Static crimson

  • Returns Color

Static cyan

  • Returns Color

Static darkBlue

  • Returns Color

Static darkCyan

  • Returns Color

Static darkGoldenRod

  • get darkGoldenRod(): Color
  • Returns Color

Static darkGray

  • Returns Color

Static darkGreen

  • Returns Color

Static darkKhaki

  • Returns Color

Static darkMagenta

  • get darkMagenta(): Color
  • Returns Color

Static darkOliveGreen

  • get darkOliveGreen(): Color
  • Returns Color

Static darkOrange

  • get darkOrange(): Color
  • Returns Color

Static darkOrchid

  • get darkOrchid(): Color
  • Returns Color

Static darkRed

  • Returns Color

Static darkSalmon

  • get darkSalmon(): Color
  • Returns Color

Static darkSeaGreen

  • get darkSeaGreen(): Color
  • Returns Color

Static darkSlateBlue

  • get darkSlateBlue(): Color
  • Returns Color

Static darkSlateGray

  • get darkSlateGray(): Color
  • Returns Color

Static darkTurquoise

  • get darkTurquoise(): Color
  • Returns Color

Static darkViolet

  • get darkViolet(): Color
  • Returns Color

Static deepPink

  • Returns Color

Static deepSkyBlue

  • get deepSkyBlue(): Color
  • Returns Color

Static dimGray

  • Returns Color

Static dodgerBlue

  • get dodgerBlue(): Color
  • Returns Color

Static fireBrick

  • Returns Color

Static floralWhite

  • get floralWhite(): Color
  • Returns Color

Static forestGreen

  • get forestGreen(): Color
  • Returns Color

Static fuchsia

  • Returns Color

Static gainsboro

  • Returns Color

Static ghostWhite

  • get ghostWhite(): Color
  • Returns Color

Static gold

  • Returns Color

Static goldenRod

  • Returns Color

Static gray

  • Returns Color

Static green

  • Returns Color

Static greenYellow

  • get greenYellow(): Color
  • Returns Color

Static honeyDew

  • Returns Color

Static hotPink

  • Returns Color

Static indianRed

  • Returns Color

Static indigo

  • Returns Color

Static ivory

  • Returns Color

Static khaki

  • Returns Color

Static lavender

  • Returns Color

Static lavenderBlush

  • get lavenderBlush(): Color
  • Returns Color

Static lawnGreen

  • Returns Color

Static lemonChiffon

  • get lemonChiffon(): Color
  • Returns Color

Static lightBlue

  • Returns Color

Static lightCoral

  • get lightCoral(): Color
  • Returns Color

Static lightCyan

  • Returns Color

Static lightGoldenRodYellow

  • get lightGoldenRodYellow(): Color
  • Returns Color

Static lightGray

  • Returns Color

Static lightGreen

  • get lightGreen(): Color
  • Returns Color

Static lightPink

  • Returns Color

Static lightSalmon

  • get lightSalmon(): Color
  • Returns Color

Static lightSeaGreen

  • get lightSeaGreen(): Color
  • Returns Color

Static lightSkyBlue

  • get lightSkyBlue(): Color
  • Returns Color

Static lightSlateGray

  • get lightSlateGray(): Color
  • Returns Color

Static lightSteelBlue

  • get lightSteelBlue(): Color
  • Returns Color

Static lightYellow

  • get lightYellow(): Color
  • Returns Color

Static lime

  • Returns Color

Static limeGreen

  • Returns Color

Static linen

  • Returns Color

Static magenta

  • Returns Color

Static maroon

  • Returns Color

Static mediumAquamarine

  • get mediumAquamarine(): Color
  • Returns Color

Static mediumBlue

  • get mediumBlue(): Color
  • Returns Color

Static mediumOrchid

  • get mediumOrchid(): Color
  • Returns Color

Static mediumPurple

  • get mediumPurple(): Color
  • Returns Color

Static mediumSeaGreen

  • get mediumSeaGreen(): Color
  • Returns Color

Static mediumSlateBlue

  • get mediumSlateBlue(): Color
  • Returns Color

Static mediumSpringGreen

  • get mediumSpringGreen(): Color
  • Returns Color

Static mediumTurquoise

  • get mediumTurquoise(): Color
  • Returns Color

Static mediumVioletRed

  • get mediumVioletRed(): Color
  • Returns Color

Static midnightBlue

  • get midnightBlue(): Color
  • Returns Color

Static mintCream

  • Returns Color

Static mistyRose

  • Returns Color

Static moccasin

  • Returns Color

Static navajoWhite

  • get navajoWhite(): Color
  • Returns Color

Static navy

  • Returns Color

Static oldLace

  • Returns Color

Static olive

  • Returns Color

Static oliveDrab

  • Returns Color

Static orange

  • Returns Color

Static orangeRed

  • Returns Color

Static orchid

  • Returns Color

Static paleGoldenRod

  • get paleGoldenRod(): Color
  • Returns Color

Static paleGreen

  • Returns Color

Static paleTurquoise

  • get paleTurquoise(): Color
  • Returns Color

Static paleVioletRed

  • get paleVioletRed(): Color
  • Returns Color

Static papayaWhip

  • get papayaWhip(): Color
  • Returns Color

Static peachPuff

  • Returns Color

Static peru

  • Returns Color

Static pink

  • Returns Color

Static plum

  • Returns Color

Static powderBlue

  • get powderBlue(): Color
  • Returns Color

Static purple

  • Returns Color

Static red

  • Returns Color

Static rosyBrown

  • Returns Color

Static royalBlue

  • Returns Color

Static saddleBrown

  • get saddleBrown(): Color
  • Returns Color

Static salmon

  • Returns Color

Static sandyBrown

  • get sandyBrown(): Color
  • Returns Color

Static seaGreen

  • Returns Color

Static seaShell

  • Returns Color

Static sienna

  • Returns Color

Static silver

  • Returns Color

Static skyBlue

  • Returns Color

Static slateBlue

  • Returns Color

Static slateGray

  • Returns Color

Static snow

  • Returns Color

Static springGreen

  • get springGreen(): Color
  • Returns Color

Static steelBlue

  • Returns Color

Static tan

  • Returns Color

Static teal

  • Returns Color

Static thistle

  • Returns Color

Static tomato

  • Returns Color

Static transparent

  • get transparent(): Color
  • Returns Color

Static turquoise

  • Returns Color

Static violet

  • Returns Color

Static wheat

  • Returns Color

Static white

  • Returns Color

Static whiteSmoke

  • get whiteSmoke(): Color
  • Returns Color

Static yellow

  • Returns Color

Static yellowGreen

  • get yellowGreen(): Color
  • Returns Color

Methods

Private serialize

  • serialize(target: BufferWriter): void
  • Parameters

    • target: BufferWriter

    Returns void

Static create

  • Returns the color that is defined by the specified color description.

    Parameters

    Returns Color

Generated using TypeDoc