Fixed hue order, never cycled

Use eight color slots in order; fold the rest into “Other”.

From dataviz (references/color-formula.md, palette.md, choosing-a-form.md).

Series count, 1 to 12

Drag past 8, then switch Vision to Deuteranopia.

Keep inventing colors Bad
    8 slots, then “Other”Good
      const SLOTS = ["#2a78d6", "#eb6834", "#1baf7a", "#eda100",
                     "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
      
      function assignColors(series) {
        const head = series.slice(0, SLOTS.length);
        const tail = series.slice(SLOTS.length);
        const out = head.map((s, i) => ({ ...s, color: SLOTS[i] }));
        if (tail.length) out.push({
          name: `Other (${tail.length})`,
          values: sumBy(tail),
          color: "var(--chart-other)",
        });
        return out;
      }

      Shuffled slots vs fixed order

      Shuffle a few times; watch the worst neighboring pair.

      Random slot assignment Bad
      Fixed order, 1 → 8Good
      function worstAdjacent(colors) {
        let cvd = Infinity, normal = Infinity;
        for (let i = 0; i < colors.length - 1; i++) {
          const a = colors[i], b = colors[i + 1];
          cvd = Math.min(cvd, deltaE(a, b, "protan"), deltaE(a, b, "deutan"));
          normal = Math.min(normal, deltaE(a, b));
        }
        return { cvd, normal, pass: cvd >= 8 && normal >= 15 };
      }

      Why it matters, pros and cons

      Why it matters

      Only neighboring slots touch, so the order is what keeps colorblind readers safe. A ninth hue collides with one already on screen.

      Pros

      • Safe by construction, no per-chart review
      • Slot 1 means the same everywhere
      • “Other” keeps totals honest

      Cons

      • Scatter and maps test all pairs: three slots max
      • Four or more slots need direct labels
      • Folding hides the tail; keep a table