All files / context palette.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42                                                            2x                      
/**
 * The brand hue ramp both frontends draw from.
 *
 * These are the Tailwind 600-level values. They are declared here, once,
 * because two unrelated features had independently written the same literals:
 * the theme accent picker in this package (`accents.ts`) and fe-public's
 * marketing card tints. Four of the hexes were byte-identical across the two,
 * which is how a brand colour quietly drifts — one side nudges its blue and
 * nothing tells the other.
 *
 * Centralising the *values* deliberately does not centralise the *shapes*.
 * The theme palette is a list the user picks from and needs a label and a
 * foreground colour per entry; the marketing palette is a fixed lookup with
 * neither. They stay separate structures over one set of colours.
 *
 * Not to be confused with fe-core's `components/appearance/tones.ts`, which
 * is the **500**-level ramp — a lighter scale for tinted surfaces behind
 * icons, not solid brand fills. The two ramps are different on purpose.
 */
export type BrandHue =
  | "blue"
  | "indigo"
  | "violet"
  | "cyan"
  | "teal"
  | "emerald"
  | "amber"
  | "rose"
  | "pink";
 
export const BRAND_RAMP: Record<BrandHue, string> = {
  blue: "#2563eb",
  indigo: "#4f46e5",
  violet: "#7c3aed",
  cyan: "#0891b2",
  teal: "#0d9488",
  emerald: "#059669",
  amber: "#d97706",
  rose: "#e11d48",
  pink: "#db2777",
};