Tricolore - v0.1.0
    Preparing search index...

    Class ColorMapping

    Color mapping functions

    Index

    Constructors

    Methods

    • Map ternary compositions to colors using balance scheme

      Parameters

      • P: TernaryPoint[]

        Array of ternary compositions

      • center: TernaryPoint = ...

        Center of color scale

      • breaks: number = 4

        Number of breaks for discretization (use Infinity or null or a value > 100 for continuous scale)

      • hue: number = 80

        Primary hue in degrees [0-360]

      • chroma: number = 140

        Maximum chroma [0-200]

      • lightness: number = 80

        Lightness [0-100]

      • contrast: number = 0.4

        Contrast [0-1]

      • spread: number = 1

        Spread around center (>0)

      Returns TricoloreResult[]

      Array of color results

    • Convert HCL color to Hex RGB

      Parameters

      • h: number

        Hue [0-360]

      • c: number

        Chroma [0-200]

      • l: number

        Lightness [0-100]

      Returns string

      Hex RGB string