IFClite TypeScript API
    Preparing search index...

    Function uniqueColor

    • Generate a unique color for index i using golden-angle hue distribution.

      Produces unlimited perceptually distinct colors:

      • Hue: golden angle spacing (maximally distributed for any N)
      • Saturation: alternates between 65% and 80% to add variety
      • Lightness: cycles through 3 levels (45%, 55%, 35%) for depth

      Colors are visually distinct for typical N. The hue uses golden-angle spacing to stay maximally separated, but exact-hex collisions are possible beyond ~1.8k distinct values (the first occurs at i=1842, which matches i=12) because the output is quantized to 6-digit hex.

      Parameters

      • i: number

      Returns string