Class Color

Hierarchy

  • Base
    • Color

Constructors

Properties

b: number
g: number
r: number
NAMES: { aliceblue: number; antiquewhite: number; aqua: number; aquamarine: number; azure: number; beige: number; bisque: number; black: number; blanchedalmond: number; blue: number; blueviolet: number; brown: number; burlywood: number; cadetblue: number; chartreuse: number; chocolate: number; coral: number; cornflowerblue: number; cornsilk: number; crimson: number; cyan: number; darkblue: number; darkcyan: number; darkgoldenrod: number; darkgray: number; darkgreen: number; darkgrey: number; darkkhaki: number; darkmagenta: number; darkolivegreen: number; darkorange: number; darkorchid: number; darkred: number; darksalmon: number; darkseagreen: number; darkslateblue: number; darkslategray: number; darkslategrey: number; darkturquoise: number; darkviolet: number; deeppink: number; deepskyblue: number; dimgray: number; dimgrey: number; dodgerblue: number; firebrick: number; floralwhite: number; forestgreen: number; fuchsia: number; gainsboro: number; ghostwhite: number; gold: number; goldenrod: number; gray: number; green: number; greenyellow: number; grey: number; honeydew: number; hotpink: number; indianred: number; indigo: number; ivory: number; khaki: number; lavender: number; lavenderblush: number; lawngreen: number; lemonchiffon: number; lightblue: number; lightcoral: number; lightcyan: number; lightgoldenrodyellow: number; lightgray: number; lightgreen: number; lightgrey: number; lightpink: number; lightsalmon: number; lightseagreen: number; lightskyblue: number; lightslategray: number; lightslategrey: number; lightsteelblue: number; lightyellow: number; lime: number; limegreen: number; linen: number; magenta: number; maroon: number; mediumaquamarine: number; mediumblue: number; mediumorchid: number; mediumpurple: number; mediumseagreen: number; mediumslateblue: number; mediumspringgreen: number; mediumturquoise: number; mediumvioletred: number; midnightblue: number; mintcream: number; mistyrose: number; moccasin: number; navajowhite: number; navy: number; oldlace: number; olive: number; olivedrab: number; orange: number; orangered: number; orchid: number; palegoldenrod: number; palegreen: number; paleturquoise: number; palevioletred: number; papayawhip: number; peachpuff: number; peru: number; pink: number; plum: number; powderblue: number; purple: number; rebeccapurple: number; red: number; rosybrown: number; royalblue: number; saddlebrown: number; salmon: number; sandybrown: number; seagreen: number; seashell: number; sienna: number; silver: number; skyblue: number; slateblue: number; slategray: number; slategrey: number; snow: number; springgreen: number; steelblue: number; tan: number; teal: number; thistle: number; tomato: number; turquoise: number; violet: number; wheat: number; white: number; whitesmoke: number; yellow: number; yellowgreen: number }

Type declaration

  • aliceblue: number
  • antiquewhite: number
  • aqua: number
  • aquamarine: number
  • azure: number
  • beige: number
  • bisque: number
  • black: number
  • blanchedalmond: number
  • blue: number
  • blueviolet: number
  • brown: number
  • burlywood: number
  • cadetblue: number
  • chartreuse: number
  • chocolate: number
  • coral: number
  • cornflowerblue: number
  • cornsilk: number
  • crimson: number
  • cyan: number
  • darkblue: number
  • darkcyan: number
  • darkgoldenrod: number
  • darkgray: number
  • darkgreen: number
  • darkgrey: number
  • darkkhaki: number
  • darkmagenta: number
  • darkolivegreen: number
  • darkorange: number
  • darkorchid: number
  • darkred: number
  • darksalmon: number
  • darkseagreen: number
  • darkslateblue: number
  • darkslategray: number
  • darkslategrey: number
  • darkturquoise: number
  • darkviolet: number
  • deeppink: number
  • deepskyblue: number
  • dimgray: number
  • dimgrey: number
  • dodgerblue: number
  • firebrick: number
  • floralwhite: number
  • forestgreen: number
  • fuchsia: number
  • gainsboro: number
  • ghostwhite: number
  • gold: number
  • goldenrod: number
  • gray: number
  • green: number
  • greenyellow: number
  • grey: number
  • honeydew: number
  • hotpink: number
  • indianred: number
  • indigo: number
  • ivory: number
  • khaki: number
  • lavender: number
  • lavenderblush: number
  • lawngreen: number
  • lemonchiffon: number
  • lightblue: number
  • lightcoral: number
  • lightcyan: number
  • lightgoldenrodyellow: number
  • lightgray: number
  • lightgreen: number
  • lightgrey: number
  • lightpink: number
  • lightsalmon: number
  • lightseagreen: number
  • lightskyblue: number
  • lightslategray: number
  • lightslategrey: number
  • lightsteelblue: number
  • lightyellow: number
  • lime: number
  • limegreen: number
  • linen: number
  • magenta: number
  • maroon: number
  • mediumaquamarine: number
  • mediumblue: number
  • mediumorchid: number
  • mediumpurple: number
  • mediumseagreen: number
  • mediumslateblue: number
  • mediumspringgreen: number
  • mediumturquoise: number
  • mediumvioletred: number
  • midnightblue: number
  • mintcream: number
  • mistyrose: number
  • moccasin: number
  • navajowhite: number
  • navy: number
  • oldlace: number
  • olive: number
  • olivedrab: number
  • orange: number
  • orangered: number
  • orchid: number
  • palegoldenrod: number
  • palegreen: number
  • paleturquoise: number
  • palevioletred: number
  • papayawhip: number
  • peachpuff: number
  • peru: number
  • pink: number
  • plum: number
  • powderblue: number
  • purple: number
  • rebeccapurple: number
  • red: number
  • rosybrown: number
  • royalblue: number
  • saddlebrown: number
  • salmon: number
  • sandybrown: number
  • seagreen: number
  • seashell: number
  • sienna: number
  • silver: number
  • skyblue: number
  • slateblue: number
  • slategray: number
  • slategrey: number
  • snow: number
  • springgreen: number
  • steelblue: number
  • tan: number
  • teal: number
  • thistle: number
  • tomato: number
  • turquoise: number
  • violet: number
  • wheat: number
  • white: number
  • whitesmoke: number
  • yellow: number
  • yellowgreen: number

Accessors

  • get isBox2(): boolean
  • Returns boolean

  • get isBox3(): boolean
  • Returns boolean

  • get isColor(): boolean
  • Returns boolean

  • get isCylindrical(): boolean
  • Returns boolean

  • get isEuler(): boolean
  • Returns boolean

  • get isLine3(): boolean
  • Returns boolean

  • get isMatrix3(): boolean
  • Returns boolean

  • get isMatrix4(): boolean
  • Returns boolean

  • get isPlane(): boolean
  • Returns boolean

  • get isQuaternion(): boolean
  • Returns boolean

  • get isRay(): boolean
  • Returns boolean

  • get isSphere(): boolean
  • Returns boolean

  • get isSpherical(): boolean
  • Returns boolean

  • get isTriangle(): boolean
  • Returns boolean

  • get isVector2(): boolean
  • Returns boolean

  • get isVector3(): boolean
  • Returns boolean

  • get isVector4(): boolean
  • Returns boolean

Methods

  • Returns IterableIterator<number>

  • Parameters

    • Optional gammaFactor: number

    Returns Color

  • Parameters

    • Optional gammaFactor: number

    Returns Color

  • Sets this color's red, green and blue value from the provided array or array-like.

    Parameters

    • array: number[]

      the source array or array-like.

    • Optional offset: number

      (optional) offset into the array-like. Default is 0.

    Returns Color

  • Parameters

    • h: number
    • s: number
    • l: number

    Returns Color

  • Parameters

    • h: number
    • s: number
    • l: number

    Returns Color

  • Parameters

    • r: number
    • g: number
    • b: number

    Returns Color

  • Returns an array [red, green, blue], or copies red, green and blue into the provided array.

    Returns

    The created or provided array.

    Parameters

    • Optional array: number[]

      (optional) array to store the color to. If this is not provided, a new array will be created.

    • Optional offset: number

      (optional) optional offset into the array.

    Returns number[]