Download backend/src/shared/theme.ts from tfrere-projects/research-article-template-editor2: direct link, hf CLI and curl.
- Browser
- Download file 671 Bytes
-
https://huggingface.co/spaces/tfrere-projects/research-article-template-editor2/resolve/main/backend/src/shared/theme.ts
- Command line
-
hf download hf://spaces/tfrere-projects/research-article-template-editor2/backend/src/shared/theme.ts
-
curl -L -o theme.ts https://huggingface.co/spaces/tfrere-projects/research-article-template-editor2/resolve/main/backend/src/shared/theme.ts
671 Bytes
| /** | |
| * Shared theming constants used by both the editor (to preview primary color | |
| * changes live) and the publisher (to bake them into the published HTML). | |
| * | |
| * Keep lightness/chroma here as the single source of truth. CSS `_variables.css` | |
| * still owns the *default* primary hue; this module only defines the L/C pair | |
| * shared by the HueSlider preview and the server-side override. | |
| */ | |
| export const OKLCH_L = 0.75; | |
| export const OKLCH_C = 0.12; | |
| /** Format an OKLCH color string using the shared L/C and a given hue (0-360). */ | |
| export function oklchFromHue(hue: number): string { | |
| const h = ((hue % 360) + 360) % 360; | |
| return `oklch(${OKLCH_L} ${OKLCH_C} ${h})`; | |
| } | |