// Visual themes. "Ink" is the original look: flat black shapes on white. // // ui – colour scheme for the toolbar and panels ("light" | "dark") // edges – colour of the container's wireframe // lit – false = flat, unshaded shapes; true = shaded with lights // colors – shapes pick from this list (one colour = monochrome) // highlight – colour of the shape you're holding // // The stage background is a CSS gradient per theme (see `[data-scene]` in styles.css). export const THEMES = Object.freeze({ ink: { ui: "light", edges: "#141416", edgeOpacity: 1, lit: false, colors: ["#141416"], highlight: "#ff4d2e", chrome: "#ffffff", }, night: { ui: "dark", edges: "#e8e8ee", edgeOpacity: 0.8, lit: false, colors: ["#f2f2f5"], highlight: "#ffb020", chrome: "#0d0d11", }, prism: { ui: "dark", edges: "#ffffff", edgeOpacity: 0.35, lit: true, colors: ["#ff5d73", "#ffb84d", "#4dd4ac", "#5aa9ff", "#b28dff"], highlight: "#ffffff", chrome: "#141226", }, }); /** Resolve a theme setting ("auto" follows the operating system) to its key. */ export function resolveThemeKey(setting) { if (setting !== "auto") return setting; return matchMedia("(prefers-color-scheme: dark)").matches ? "night" : "ink"; }