Class ColorDistribution

Specifies a color as a distribution, which can include a constant color, random color range or a color gradient.

Hierarchy

  • FrameworkObject
    • ColorDistribution

Constructors

  • Creates a new distribution that returns a constant color.

    Parameters

    • Optionaloptions:
          | {
              color: Immutable<Color>;
          }
          | {
              maxColor: Immutable<Color>;
              minColor: Immutable<Color>;
          }
          | {
              gradient: ColorGradient;
          }
          | {
              maxGradient: ColorGradient;
              minGradient: ColorGradient;
          }

      Options object for the function call.

    • OptionalisInternalConstructor: boolean

    Returns ColorDistribution

Accessors

Methods

  • Returns the maximum value of a constant range. Only defined if the distribution represents a non-gradient range.

    Returns Color

  • Returns the curve representing the second gradient of a gradient range. Only defined if the distribution represents a gradient range.

    Returns ColorGradient

  • Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if the distribution is represented by a gradient.

    Returns Color

  • Returns the gradient representing the distribution, or the first gradient representing a gradient range. Undefined if the distribution is represented by a constant or a non-gradient range.

    Returns ColorGradient