Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Color

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

a

a: number

The alpha channel value, in the range 0 to 255 (inclusive).

b

b: number

The blue channel value, in the range 0 to 255 (inclusive).

g

g: number

The green channel value, in the range 0 to 255 (inclusive).

name

name: string

The color name, if defined; otherwise an empty string.

r

r: number

The red channel value, in the range 0 to 255 (inclusive).

Methods

toFormat

  • toFormat(): string
  • If the color's name is non-empty, return that. Otherwise return its textualization in the form rgb(R,G,B). The alpha channel is ignored.

    Returns string

toSimpleHex

  • toSimpleHex(): string
  • If the color's name is non-empty, return that. Otherwise return its textualization in the form AARRGGBB, with hexadecimal values.

    Returns string

toString

  • toString(): string
  • If the color's name is non-empty, return that. Otherwise return its textualization in the form #RRGGBB, with hexadecimal values. The alpha channel is ignored.

    Returns string

Generated using TypeDoc