tfrere/research-article-template-editor
3
1/**2 * Shared theming constants used by both the editor (to preview primary color3 * changes live) and the publisher (to bake them into the published HTML).4 *5 * Keep lightness/chroma here as the single source of truth. CSS `_variables.css`6 * still owns the *default* primary hue; this module only defines the L/C pair7 * shared by the HueSlider preview and the server-side override.8 */9 10export const OKLCH_L = 0.75;11export const OKLCH_C = 0.12;12 13/** Format an OKLCH color string using the shared L/C and a given hue (0-360). */14export function oklchFromHue(hue: number): string {15 const h = ((hue % 360) + 360) % 360;16 return `oklch(${OKLCH_L} ${OKLCH_C} ${h})`;17}18 