Class EsriColour

Hierarchy

  • EsriColour

Constructors

  • Parameters

    • color: any

    Returns EsriColour

Properties

a: number

The alpha value.

Read more...

b: number

The blue value.

Read more...

g: number

The green value.

Read more...

r: number

The red value.

Read more...

Methods

  • Takes an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with r, g, b, and a properties, or a Color object and sets this color instance to the input value.

    Read more...

    Parameters

    • color: any

    Returns EsriColour

  • Returns a CSS color string in rgba form representing the Color instance.

    Read more...

    Parameters

    • Optional includeAlpha: boolean

    Returns string

  • Returns a CSS color string in hexadecimal form that represents the Color instance.

    Read more...

    Returns string

  • Returns a JSON object with all the values from a Color instance.

    Read more...

    Returns any

  • Returns a 3-component array of rgb values that represent the Color instance.

    Read more...

    Returns number[]

  • Returns a 4-component array of rgba values that represent the Color instance.

    Read more...

    Returns number[]

  • Creates a Color instance using a 3 or 4 element array, mapping each element in sequence to the rgb(a) values of the color.

    Read more...

    Parameters

    Returns EsriColour

  • Creates a Color instance from a hex string with a '#' prefix.

    Read more...

    Parameters

    Returns EsriColour

  • Creates a new Color instance, and initializes it with values from a JSON object.

    Read more...

    Parameters

    • json: any

    Returns EsriColour

  • Creates a Color instance from a string of the form "rgb()" or "rgba()".

    Read more...

    Parameters

    Returns EsriColour

  • Creates a Color instance by parsing a generic string.

    Read more...

    Parameters

    Returns EsriColour

Generated using TypeDoc