A ColorMap represents an ordered collection of levels (Numbers) and associated colors.

These levels could be anything. For example, an altitude in meters, or a pressure in Pascal.

The colors can be retrieved using retrieveColor. This function returns the color at a given level. In case of a gradient color map, it will interpolate the colors (including alpha).

Constructors

Methods

Constructors

  • This class should not be instantiated by users of LuciadRIA.

    Returns ColorMap

Methods

  • Retrieves the color at the given level.

    This method will respect the gradient or piece wise constant nature of this color map. In case the color map is gradient, it will interpolate between the colors (including alpha).

    Parameters

    • level: number

      The level for which to retrieve the color.

    Returns string

    the color at the given level, as a CSS color string.

    2024.0