diff --git a/bin/scheme.mjs b/bin/scheme.mjs index 055ca1e9..745f3ef1 100644 --- a/bin/scheme.mjs +++ b/bin/scheme.mjs @@ -4,15 +4,23 @@ * Rebuild with `npm run build:scheme` after changing this file or upgrading * @material/material-color-utilities; the bundle is committed so applications need * nothing but `node`. (The published library imports without file extensions, which - * plain Node refuses, so it cannot be run unbundled anyway.) + * plain Node refuses, so it cannot be run unbundled anyway — and two of the classes + * below are imported by path, which only a bundler resolves.) * - * Input: one JSON argument — {seed, variant, spec, contrast, success, warning, info}. `spec` is - * the colour spec, '2025' (M3 Expressive, the default) or '2021' (M3 as it first shipped). - * Output: JSON on stdout — {seed, variant, spec, contrast, light: {role: hex}, dark: {role: hex}}. + * Input: one JSON argument — {seed, variant, spec, contrast, harmonize, success, warning, + * info}. `spec` is the colour spec, '2025' (M3 Expressive, the default) or '2021' (M3 as it + * first shipped). `contrast` is the standard level, below M3's medium (0.5). + * Output: JSON on stdout — {seed, variant, spec, harmonize, contrast: {standard, medium: + * {light, dark}, high: {light, dark}}, light: {role: hex}, dark: {role: hex}}. The top-level + * light and dark are the standard level; medium (0.5) and high (1.0) are M3's other two + * contrast levels, generated for both themes so a stylesheet can key them on an attribute. */ import { argbFromHex, - customColor, + Blend, + clampDouble, + DynamicColor, + extendSpecVersion, hexFromArgb, Hct, MaterialDynamicColors, @@ -25,7 +33,12 @@ import { SchemeRainbow, SchemeTonalSpot, SchemeVibrant, + TonalPalette, + Variant, } from '@material/material-color-utilities' +// Google exports neither from the package's index; the bundler resolves the path. +import { ContrastCurve } from '../node_modules/@material/material-color-utilities/dynamiccolor/contrast_curve.js' +import { ToneDeltaPair } from '../node_modules/@material/material-color-utilities/dynamiccolor/tone_delta_pair.js' const VARIANTS = { 'tonal-spot': SchemeTonalSpot, @@ -39,9 +52,15 @@ const VARIANTS = { 'fruit-salad': SchemeFruitSalad, } +// M3's three contrast levels (styles/color/roles, "What's new May 2025"): standard is the +// scheme's own level, medium and high are fixed. Every level is generated for both themes. +const LEVELS = { standard: 0, medium: 0.5, high: 1 } + // Key colours seed the palettes; they are not roles a stylesheet paints with. const NOT_ROLES = /_palette_key_color$/ +const STATES = ['success', 'warning', 'info'] + function fail(message) { process.stderr.write(`${message}\n`) process.exit(1) @@ -64,22 +83,179 @@ if (!hex.test(input.seed ?? '')) fail(`The seed must be a #rrggbb colour, "${inp if (!Scheme) fail(`Unknown variant "${input.variant}". Use one of: ${Object.keys(VARIANTS).join(', ')}.`) if (!SPECS.includes(spec)) fail(`Unknown spec "${spec}". Use one of: ${SPECS.join(', ')}.`) -for (const state of ['success', 'warning', 'info']) { +for (const state of STATES) { if (!hex.test(input[state] ?? '')) fail(`The ${state} colour must be a #rrggbb colour, "${input[state]}" given.`) } const contrast = Number(input.contrast ?? 0) +const harmonize = Boolean(input.harmonize ?? false) -if (!(contrast >= -1 && contrast <= 1)) fail(`The contrast level must be between -1 and 1, "${input.contrast}" given.`) +if (!(contrast >= -1 && contrast < LEVELS.medium)) { + fail(`The standard contrast level runs from -1 to below ${LEVELS.medium}, "${input.contrast}" given; medium and high are generated as their own blocks.`) +} const source = Hct.fromInt(argbFromHex(input.seed)) const colors = new MaterialDynamicColors() -function roles(isDark) { +/** + * The contrast curves of Google's 2025 spec, from its private getCurve() + * (dynamiccolor/color_spec_2025.js). + */ +function curve(defaultContrast) { + return { + 1.5: new ContrastCurve(1.5, 1.5, 3, 5.5), + 3: new ContrastCurve(3, 3, 4.5, 7), + 4.5: new ContrastCurve(4.5, 4.5, 7, 11), + 6: new ContrastCurve(6, 6, 7, 11), + 7: new ContrastCurve(7, 7, 11, 21), + }[defaultContrast] +} + +/** The tone that holds the palette's chroma, searching up or down — Google's findBestToneForChroma. */ +function bestToneForChroma(hue, chroma, tone, byDecreasingTone) { + let answer = tone + let best = Hct.from(hue, chroma, answer) + + while (best.chroma < chroma) { + if (tone < 0 || tone > 100) break + + tone += byDecreasingTone ? -1 : 1 + + const candidate = Hct.from(hue, chroma, tone) + + if (best.chroma < candidate.chroma) { + best = candidate + answer = tone + } + } + + return answer +} + +/** Google's tMaxC: the most chromatic tone, from the top. */ +function tMaxC(palette, lowerBound = 0, upperBound = 100) { + return clampDouble(lowerBound, upperBound, bestToneForChroma(palette.hue, palette.chroma, 100, true)) +} + +/** Google's tMinC: the most chromatic tone, from the bottom. */ +function tMinC(palette, lowerBound = 0, upperBound = 100) { + return clampDouble(lowerBound, upperBound, bestToneForChroma(palette.hue, palette.chroma, 0, false)) +} + +/** + * success, warning and info as M3 custom colours: the four roles of a semantic colour, built on + * their own tonal palette exactly as Google builds error / on-error / error-container / + * on-error-container — the same tones, contrast curves and tone delta pairs in both specs + * (dynamiccolor/color_spec_2021.js and color_spec_2025.js, "Errors [E]"). Because they are + * DynamicColors against the page's own DynamicScheme, they follow its contrast level, its dark + * tones, its spec version and its platform the way every other role does; the 2021 recipe they + * used before (customColor) was fixed at tones 40/100/90/10 whatever the scheme asked for. + */ +function stateRoles(name, palette) { + const of = () => palette + let color, onColor, container, onContainer + + color = extendSpecVersion( + DynamicColor.fromPalette({ + name, + palette: of, + tone: (s) => (s.isDark ? 80 : 40), + isBackground: true, + background: (s) => colors.highestSurface(s), + contrastCurve: () => new ContrastCurve(3, 4.5, 7, 7), + toneDeltaPair: () => new ToneDeltaPair(container, color, 10, 'nearer', false), + }), + '2025', + DynamicColor.fromPalette({ + name, + palette: of, + tone: (s) => (s.platform === 'phone' ? (s.isDark ? tMinC(palette, 0, 98) : tMaxC(palette)) : tMinC(palette)), + isBackground: true, + background: (s) => (s.platform === 'phone' ? colors.highestSurface(s) : colors.surfaceContainerHigh()), + contrastCurve: (s) => (s.platform === 'phone' ? curve(4.5) : curve(7)), + toneDeltaPair: (s) => (s.platform === 'phone' ? new ToneDeltaPair(container, color, 5, 'relative_lighter', true, 'farther') : undefined), + }), + ) + + onColor = extendSpecVersion( + DynamicColor.fromPalette({ + name: `on_${name}`, + palette: of, + tone: (s) => (s.isDark ? 20 : 100), + background: () => color, + contrastCurve: () => new ContrastCurve(4.5, 7, 11, 21), + }), + '2025', + DynamicColor.fromPalette({ + name: `on_${name}`, + palette: of, + // Google's on-error sits on error-dim off the phone; a state colour has no dim role. + background: () => color, + contrastCurve: (s) => (s.platform === 'phone' ? curve(6) : curve(7)), + }), + ) + + container = extendSpecVersion( + DynamicColor.fromPalette({ + name: `${name}_container`, + palette: of, + tone: (s) => (s.isDark ? 30 : 90), + isBackground: true, + background: (s) => colors.highestSurface(s), + contrastCurve: () => new ContrastCurve(1, 1, 3, 4.5), + toneDeltaPair: () => new ToneDeltaPair(container, color, 10, 'nearer', false), + }), + '2025', + DynamicColor.fromPalette({ + name: `${name}_container`, + palette: of, + tone: (s) => (s.platform === 'watch' ? 30 : s.isDark ? tMinC(palette, 30, 93) : tMaxC(palette, 0, 90)), + isBackground: true, + background: (s) => (s.platform === 'phone' ? colors.highestSurface(s) : undefined), + toneDeltaPair: (s) => (s.platform === 'watch' ? new ToneDeltaPair(container, color, 10, 'darker', true, 'farther') : undefined), + contrastCurve: (s) => (s.platform === 'phone' && s.contrastLevel > 0 ? curve(1.5) : undefined), + }), + ) + + onContainer = extendSpecVersion( + DynamicColor.fromPalette({ + name: `on_${name}_container`, + palette: of, + tone: (s) => (s.variant === Variant.MONOCHROME ? (s.isDark ? 90 : 10) : s.isDark ? 90 : 30), + background: () => container, + contrastCurve: () => new ContrastCurve(3, 4.5, 7, 11), + }), + '2025', + DynamicColor.fromPalette({ + name: `on_${name}_container`, + palette: of, + background: () => container, + contrastCurve: (s) => (s.platform === 'phone' ? curve(4.5) : curve(7)), + }), + ) + + return { + [name]: color, + [`on-${name}`]: onColor, + [`${name}-container`]: container, + [`on-${name}-container`]: onContainer, + } +} + +// Harmonisation pulls a state's hue towards the seed, so the three read as part of the scheme +// (styles/color/advanced/define-new-colors). Off by default: a state has to stay recognisable +// whatever the brand is, and a green that has turned blue no longer says "success". +const states = Object.assign({}, ...STATES.map((state) => { + const value = argbFromHex(input[state]) + + return stateRoles(state, TonalPalette.fromInt(harmonize ? Blend.harmonize(value, argbFromHex(input.seed)) : value)) +})) + +function roles(isDark, contrastLevel) { // The 2025 spec is M3 Expressive's colour; the library falls back to 2021 for the // variants the new spec does not define (fidelity, content, monochrome, …). 2021 is // M3's original colour, for an application whose palette was generated with it. - const scheme = new Scheme(source, isDark, contrast, spec) + const scheme = new Scheme(source, isDark, contrastLevel, spec) const out = {} for (const color of colors.allColors) { @@ -88,36 +264,41 @@ function roles(isDark) { } } + for (const [role, color] of Object.entries(states)) { + out[role] = hexFromArgb(color.getArgb(scheme)) + } + return { scheme, out } } -const light = roles(false) -const dark = roles(true) +/** One contrast level: both themes, with each theme's inverse state colours from the other. */ +function level(contrastLevel) { + const light = roles(false, contrastLevel) + const dark = roles(true, contrastLevel) -// success, warning and info are M3 custom colours, harmonisation off: harmonising pulls -// each hue towards the seed, and a state has to stay recognisable whatever the brand is. -for (const state of ['success', 'warning', 'info']) { - const group = customColor(argbFromHex(input.seed), { name: state, value: argbFromHex(input[state]), blend: false }) - - for (const [theme, colours] of [['light', light.out], ['dark', dark.out]]) { - colours[state] = hexFromArgb(group[theme].color) - colours[`on-${state}`] = hexFromArgb(group[theme].onColor) - colours[`${state}-container`] = hexFromArgb(group[theme].colorContainer) - colours[`on-${state}-container`] = hexFromArgb(group[theme].onColorContainer) + // A state colour drawn on the inverse surface (a snackbar's icon) is the other theme's. + for (const state of ['error', ...STATES]) { + light.out[`inverse-${state}`] = dark.out[state] + dark.out[`inverse-${state}`] = light.out[state] } + + return { spec: light.scheme.specVersion, light: light.out, dark: dark.out } } -// A state colour drawn on the inverse surface (a snackbar's icon) is the other theme's. -for (const state of ['error', 'success', 'warning', 'info']) { - light.out[`inverse-${state}`] = dark.out[state] - dark.out[`inverse-${state}`] = light.out[state] -} +const standard = level(contrast) +const medium = level(LEVELS.medium) +const high = level(LEVELS.high) process.stdout.write(JSON.stringify({ seed: input.seed.toLowerCase(), variant: input.variant, - spec: light.scheme.specVersion, - contrast, - light: light.out, - dark: dark.out, + spec: standard.spec, + harmonize, + contrast: { + standard: contrast, + medium: { light: medium.light, dark: medium.dark }, + high: { light: high.light, dark: high.dark }, + }, + light: standard.light, + dark: standard.dark, })) diff --git a/resources/css/tokens/scheme.css b/resources/css/tokens/scheme.css index f483449d..1a4735b1 100644 --- a/resources/css/tokens/scheme.css +++ b/resources/css/tokens/scheme.css @@ -6,6 +6,11 @@ * Regenerate rather than editing a value: every pair here (a role and its on-role) carries * M3's contrast guarantee only as generated. The head script sets data-theme before the * first paint; the light block also stands without it. + * + * M3's medium and high contrast levels follow the standard blocks, keyed on + * data-contrast — which the head script writes from the visitor's choice, or from the + * operating system's contrast setting while that choice is `system`. No media query + * decides here, as none decides the theme. */ :root, @@ -61,22 +66,22 @@ --md-sys-color-on-error: #fff7f7; --md-sys-color-error-container: #f97386; --md-sys-color-on-error-container: #6e0523; - --md-sys-color-success: #006c45; - --md-sys-color-on-success: #ffffff; + --md-sys-color-success: #006d46; + --md-sys-color-on-success: #e7ffed; --md-sys-color-success-container: #86f9bc; - --md-sys-color-on-success-container: #002112; - --md-sys-color-warning: #7c5800; - --md-sys-color-on-warning: #ffffff; - --md-sys-color-warning-container: #ffdea6; - --md-sys-color-on-warning-container: #271900; - --md-sys-color-info: #005ac4; - --md-sys-color-on-info: #ffffff; - --md-sys-color-info-container: #d8e2ff; - --md-sys-color-on-info-container: #001a42; + --md-sys-color-on-success-container: #00734a; + --md-sys-color-warning: #7c5900; + --md-sys-color-on-warning: #fff8f1; + --md-sys-color-warning-container: #fab925; + --md-sys-color-on-warning-container: #6a4b00; + --md-sys-color-info: #005bc5; + --md-sys-color-on-info: #f9f8ff; + --md-sys-color-info-container: #1c7afc; + --md-sys-color-on-info-container: #001435; --md-sys-color-inverse-error: #f97386; - --md-sys-color-inverse-success: #69dca1; - --md-sys-color-inverse-warning: #fdbb28; - --md-sys-color-inverse-info: #aec6ff; + --md-sys-color-inverse-success: #3bb27b; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #699cff; } [data-theme='dark'] { @@ -131,20 +136,306 @@ --md-sys-color-on-error: #490013; --md-sys-color-error-container: #871c34; --md-sys-color-on-error-container: #ff97a3; - --md-sys-color-success: #69dca1; - --md-sys-color-on-success: #003822; - --md-sys-color-success-container: #005233; - --md-sys-color-on-success-container: #86f9bc; - --md-sys-color-warning: #fdbb28; - --md-sys-color-on-warning: #412d00; - --md-sys-color-warning-container: #5e4200; - --md-sys-color-on-warning-container: #ffdea6; - --md-sys-color-info: #aec6ff; - --md-sys-color-on-info: #002e6a; - --md-sys-color-info-container: #004396; - --md-sys-color-on-info-container: #d8e2ff; + --md-sys-color-success: #3bb27b; + --md-sys-color-on-success: #002615; + --md-sys-color-success-container: #059460; + --md-sys-color-on-success-container: #001e10; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #4e3600; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #593f00; + --md-sys-color-info: #699cff; + --md-sys-color-on-info: #001e4b; + --md-sys-color-info-container: #0c74f6; + --md-sys-color-on-info-container: #000a23; --md-sys-color-inverse-error: #a8364b; - --md-sys-color-inverse-success: #006c45; - --md-sys-color-inverse-warning: #7c5800; - --md-sys-color-inverse-info: #005ac4; + --md-sys-color-inverse-success: #006d46; + --md-sys-color-inverse-warning: #7c5900; + --md-sys-color-inverse-info: #005bc5; +} + +[data-contrast='medium'], +[data-contrast='medium'][data-theme='light'], +[data-contrast='medium'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #fdf7fe; + --md-sys-color-on-background: #25232b; + --md-sys-color-surface: #fdf7fe; + --md-sys-color-surface-dim: #ded8e4; + --md-sys-color-surface-bright: #fdf7fe; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #f8f1fa; + --md-sys-color-surface-container: #f2ecf5; + --md-sys-color-surface-container-high: #ece6f0; + --md-sys-color-surface-container-highest: #e7e0ec; + --md-sys-color-on-surface: #25232b; + --md-sys-color-on-surface-variant: #45414b; + --md-sys-color-outline: #615d68; + --md-sys-color-outline-variant: #7d7983; + --md-sys-color-inverse-surface: #0f0d12; + --md-sys-color-inverse-on-surface: #c8c3c9; + --md-sys-color-primary: #483b6b; + --md-sys-color-primary-dim: #3c305f; + --md-sys-color-on-primary: #e1d3ff; + --md-sys-color-primary-container: #7b6da0; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #7b6da0; + --md-sys-color-primary-fixed-dim: #6e6093; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #d4c3fd; + --md-sys-color-secondary: #464054; + --md-sys-color-secondary-dim: #3a3548; + --md-sys-color-on-secondary: #dfd5ef; + --md-sys-color-secondary-container: #787187; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #787187; + --md-sys-color-secondary-fixed-dim: #6c657b; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #5c3653; + --md-sys-color-tertiary-dim: #502b47; + --md-sys-color-on-tertiary: #ffcaee; + --md-sys-color-tertiary-container: #936787; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #936787; + --md-sys-color-tertiary-fixed-dim: #855b7a; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #821830; + --md-sys-color-error-dim: #6b0221; + --md-sys-color-on-error: #ffcdd1; + --md-sys-color-error-container: #c44b5f; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #004d30; + --md-sys-color-on-success: #7df0b3; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #593e00; + --md-sys-color-on-warning: #ffd385; + --md-sys-color-warning-container: #986d00; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #003f8e; + --md-sys-color-on-info: #cbd9ff; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ff9da8; + --md-sys-color-inverse-success: #5ace94; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #98b8ff; +} + +[data-contrast='medium'][data-theme='dark'], +[data-contrast='medium'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #0f0d12; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #0f0d12; + --md-sys-color-surface-dim: #0f0d12; + --md-sys-color-surface-bright: #2e2b34; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #141218; + --md-sys-color-surface-container: #1b181f; + --md-sys-color-surface-container-high: #211e26; + --md-sys-color-surface-container-highest: #27242d; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #bcb6c2; + --md-sys-color-outline: #96919c; + --md-sys-color-outline-variant: #78737e; + --md-sys-color-inverse-surface: #fdf7fe; + --md-sys-color-inverse-on-surface: #39373c; + --md-sys-color-primary: #cdc0ec; + --md-sys-color-primary-dim: #bfb2de; + --md-sys-color-on-primary: #3a3054; + --md-sys-color-primary-container: #7a6f96; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #ded0fe; + --md-sys-color-primary-fixed-dim: #d0c3ef; + --md-sys-color-on-primary-fixed: #180e30; + --md-sys-color-on-primary-fixed-variant: #3c3256; + --md-sys-color-inverse-primary: #5a4f75; + --md-sys-color-secondary: #cbc2db; + --md-sys-color-secondary-dim: #beb5cd; + --md-sys-color-on-secondary: #393347; + --md-sys-color-secondary-container: #787187; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #e8def8; + --md-sys-color-secondary-fixed-dim: #dad0ea; + --md-sys-color-on-secondary-fixed: #221d2f; + --md-sys-color-on-secondary-fixed-variant: #423c50; + --md-sys-color-tertiary: #ffcfef; + --md-sys-color-tertiary-dim: #f4bfe3; + --md-sys-color-on-tertiary: #5e3855; + --md-sys-color-tertiary-container: #f4bfe3; + --md-sys-color-on-tertiary-container: #542f4c; + --md-sys-color-tertiary-fixed: #f4bfe3; + --md-sys-color-tertiary-fixed-dim: #e5b2d5; + --md-sys-color-on-tertiary-fixed: #180015; + --md-sys-color-on-tertiary-fixed-variant: #4a2642; + --md-sys-color-error: #ff9da8; + --md-sys-color-error-dim: #ff8695; + --md-sys-color-on-error: #5f001c; + --md-sys-color-error-container: #c44b5f; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #5ace94; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #412d00; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #332200; + --md-sys-color-info: #98b8ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #821830; + --md-sys-color-inverse-success: #004d30; + --md-sys-color-inverse-warning: #593e00; + --md-sys-color-inverse-info: #003f8e; +} + +[data-contrast='high'], +[data-contrast='high'][data-theme='light'], +[data-contrast='high'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #fdf7fe; + --md-sys-color-on-background: #000000; + --md-sys-color-surface: #fdf7fe; + --md-sys-color-surface-dim: #ded8e4; + --md-sys-color-surface-bright: #fdf7fe; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #f8f1fa; + --md-sys-color-surface-container: #f2ecf5; + --md-sys-color-surface-container-high: #ece6f0; + --md-sys-color-surface-container-highest: #e7e0ec; + --md-sys-color-on-surface: #000000; + --md-sys-color-on-surface-variant: #25232b; + --md-sys-color-outline: #45414b; + --md-sys-color-outline-variant: #54505a; + --md-sys-color-inverse-surface: #0f0d12; + --md-sys-color-inverse-on-surface: #ffffff; + --md-sys-color-primary: #281b49; + --md-sys-color-primary-dim: #1e103f; + --md-sys-color-on-primary: #e1d3ff; + --md-sys-color-primary-container: #584a7b; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #584a7b; + --md-sys-color-primary-fixed-dim: #4c3f6f; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #d4c3fd; + --md-sys-color-secondary: #262134; + --md-sys-color-secondary-dim: #1c1729; + --md-sys-color-on-secondary: #dfd6ef; + --md-sys-color-secondary-container: #554f64; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #554f64; + --md-sys-color-secondary-fixed-dim: #494358; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #391733; + --md-sys-color-tertiary-dim: #2e0d28; + --md-sys-color-on-tertiary: #ffcbee; + --md-sys-color-tertiary-container: #6d4563; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #6d4563; + --md-sys-color-tertiary-fixed-dim: #603a57; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #500016; + --md-sys-color-error-dim: #3d000f; + --md-sys-color-on-error: #ffced2; + --md-sys-color-error-container: #97283e; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #002a18; + --md-sys-color-on-success: #7df0b4; + --md-sys-color-success-container: #005f3c; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #312100; + --md-sys-color-on-warning: #ffd486; + --md-sys-color-warning-container: #6c4d00; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #002252; + --md-sys-color-on-info: #ccdaff; + --md-sys-color-info-container: #004eac; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ffdddf; + --md-sys-color-inverse-success: #89fcbf; + --md-sys-color-inverse-warning: #ffe2b1; + --md-sys-color-inverse-info: #dde5ff; +} + +[data-contrast='high'][data-theme='dark'], +[data-contrast='high'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #0f0d12; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #0f0d12; + --md-sys-color-surface-dim: #0f0d12; + --md-sys-color-surface-bright: #2e2b34; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #141218; + --md-sys-color-surface-container: #1b181f; + --md-sys-color-surface-container-high: #211e26; + --md-sys-color-surface-container-highest: #27242d; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #eae3ef; + --md-sys-color-outline: #bcb6c2; + --md-sys-color-outline-variant: #a7a1ad; + --md-sys-color-inverse-surface: #fdf7fe; + --md-sys-color-inverse-on-surface: #000000; + --md-sys-color-primary: #ebe1ff; + --md-sys-color-primary-dim: #ded0fe; + --md-sys-color-on-primary: #302649; + --md-sys-color-primary-container: #aa9dc8; + --md-sys-color-on-primary-container: #000000; + --md-sys-color-primary-fixed: #ded0fe; + --md-sys-color-primary-fixed-dim: #d0c3ef; + --md-sys-color-on-primary-fixed: #000000; + --md-sys-color-on-primary-fixed-variant: #180e30; + --md-sys-color-inverse-primary: #3c3256; + --md-sys-color-secondary: #ebe1fb; + --md-sys-color-secondary-dim: #ddd3ed; + --md-sys-color-on-secondary: #2e293c; + --md-sys-color-secondary-container: #a8a0b8; + --md-sys-color-on-secondary-container: #000000; + --md-sys-color-secondary-fixed: #e8def8; + --md-sys-color-secondary-fixed-dim: #dad0ea; + --md-sys-color-on-secondary-fixed: #000000; + --md-sys-color-on-secondary-fixed-variant: #221d2f; + --md-sys-color-tertiary: #ffdbf2; + --md-sys-color-tertiary-dim: #fac5e9; + --md-sys-color-on-tertiary: #43203b; + --md-sys-color-tertiary-container: #f4bfe3; + --md-sys-color-on-tertiary-container: #2e0e29; + --md-sys-color-tertiary-fixed: #f4bfe3; + --md-sys-color-tertiary-fixed-dim: #e5b2d5; + --md-sys-color-on-tertiary-fixed: #000000; + --md-sys-color-on-tertiary-fixed-variant: #180015; + --md-sys-color-error: #ffdddf; + --md-sys-color-error-dim: #ffc7cb; + --md-sys-color-on-error: #5f001c; + --md-sys-color-error-container: #ff798c; + --md-sys-color-on-error-container: #000000; + --md-sys-color-success: #89fcbf; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #42b880; + --md-sys-color-on-success-container: #000000; + --md-sys-color-warning: #ffe2b1; + --md-sys-color-on-warning: #3c2900; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #000000; + --md-sys-color-info: #dde5ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #74a2ff; + --md-sys-color-on-info-container: #000000; + --md-sys-color-inverse-error: #500016; + --md-sys-color-inverse-success: #002a18; + --md-sys-color-inverse-warning: #312100; + --md-sys-color-inverse-info: #002252; } diff --git a/resources/css/tokens/scheme.json b/resources/css/tokens/scheme.json index e5160c76..ef45f7a7 100644 --- a/resources/css/tokens/scheme.json +++ b/resources/css/tokens/scheme.json @@ -2,7 +2,282 @@ "seed": "#6750a4", "variant": "tonal-spot", "spec": "2025", - "contrast": 0, + "harmonize": false, + "contrast": { + "standard": 0, + "medium": { + "light": { + "background": "#fdf7fe", + "on-background": "#25232b", + "surface": "#fdf7fe", + "surface-dim": "#ded8e4", + "surface-bright": "#fdf7fe", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#f8f1fa", + "surface-container": "#f2ecf5", + "surface-container-high": "#ece6f0", + "surface-container-highest": "#e7e0ec", + "on-surface": "#25232b", + "on-surface-variant": "#45414b", + "outline": "#615d68", + "outline-variant": "#7d7983", + "inverse-surface": "#0f0d12", + "inverse-on-surface": "#c8c3c9", + "primary": "#483b6b", + "primary-dim": "#3c305f", + "on-primary": "#e1d3ff", + "primary-container": "#7b6da0", + "on-primary-container": "#ffffff", + "primary-fixed": "#7b6da0", + "primary-fixed-dim": "#6e6093", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#d4c3fd", + "secondary": "#464054", + "secondary-dim": "#3a3548", + "on-secondary": "#dfd5ef", + "secondary-container": "#787187", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#787187", + "secondary-fixed-dim": "#6c657b", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#5c3653", + "tertiary-dim": "#502b47", + "on-tertiary": "#ffcaee", + "tertiary-container": "#936787", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#936787", + "tertiary-fixed-dim": "#855b7a", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#821830", + "error-dim": "#6b0221", + "on-error": "#ffcdd1", + "error-container": "#c44b5f", + "on-error-container": "#ffffff", + "success": "#004d30", + "on-success": "#7df0b3", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#593e00", + "on-warning": "#ffd385", + "warning-container": "#986d00", + "on-warning-container": "#ffffff", + "info": "#003f8e", + "on-info": "#cbd9ff", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#ff9da8", + "inverse-success": "#5ace94", + "inverse-warning": "#f3b31e", + "inverse-info": "#98b8ff" + }, + "dark": { + "background": "#0f0d12", + "on-background": "#ffffff", + "surface": "#0f0d12", + "surface-dim": "#0f0d12", + "surface-bright": "#2e2b34", + "surface-container-lowest": "#000000", + "surface-container-low": "#141218", + "surface-container": "#1b181f", + "surface-container-high": "#211e26", + "surface-container-highest": "#27242d", + "on-surface": "#ffffff", + "on-surface-variant": "#bcb6c2", + "outline": "#96919c", + "outline-variant": "#78737e", + "inverse-surface": "#fdf7fe", + "inverse-on-surface": "#39373c", + "primary": "#cdc0ec", + "primary-dim": "#bfb2de", + "on-primary": "#3a3054", + "primary-container": "#7a6f96", + "on-primary-container": "#ffffff", + "primary-fixed": "#ded0fe", + "primary-fixed-dim": "#d0c3ef", + "on-primary-fixed": "#180e30", + "on-primary-fixed-variant": "#3c3256", + "inverse-primary": "#5a4f75", + "secondary": "#cbc2db", + "secondary-dim": "#beb5cd", + "on-secondary": "#393347", + "secondary-container": "#787187", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#e8def8", + "secondary-fixed-dim": "#dad0ea", + "on-secondary-fixed": "#221d2f", + "on-secondary-fixed-variant": "#423c50", + "tertiary": "#ffcfef", + "tertiary-dim": "#f4bfe3", + "on-tertiary": "#5e3855", + "tertiary-container": "#f4bfe3", + "on-tertiary-container": "#542f4c", + "tertiary-fixed": "#f4bfe3", + "tertiary-fixed-dim": "#e5b2d5", + "on-tertiary-fixed": "#180015", + "on-tertiary-fixed-variant": "#4a2642", + "error": "#ff9da8", + "error-dim": "#ff8695", + "on-error": "#5f001c", + "error-container": "#c44b5f", + "on-error-container": "#ffffff", + "success": "#5ace94", + "on-success": "#00341e", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#f3b31e", + "on-warning": "#412d00", + "warning-container": "#e4a604", + "on-warning-container": "#332200", + "info": "#98b8ff", + "on-info": "#002a62", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#821830", + "inverse-success": "#004d30", + "inverse-warning": "#593e00", + "inverse-info": "#003f8e" + } + }, + "high": { + "light": { + "background": "#fdf7fe", + "on-background": "#000000", + "surface": "#fdf7fe", + "surface-dim": "#ded8e4", + "surface-bright": "#fdf7fe", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#f8f1fa", + "surface-container": "#f2ecf5", + "surface-container-high": "#ece6f0", + "surface-container-highest": "#e7e0ec", + "on-surface": "#000000", + "on-surface-variant": "#25232b", + "outline": "#45414b", + "outline-variant": "#54505a", + "inverse-surface": "#0f0d12", + "inverse-on-surface": "#ffffff", + "primary": "#281b49", + "primary-dim": "#1e103f", + "on-primary": "#e1d3ff", + "primary-container": "#584a7b", + "on-primary-container": "#ffffff", + "primary-fixed": "#584a7b", + "primary-fixed-dim": "#4c3f6f", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#d4c3fd", + "secondary": "#262134", + "secondary-dim": "#1c1729", + "on-secondary": "#dfd6ef", + "secondary-container": "#554f64", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#554f64", + "secondary-fixed-dim": "#494358", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#391733", + "tertiary-dim": "#2e0d28", + "on-tertiary": "#ffcbee", + "tertiary-container": "#6d4563", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#6d4563", + "tertiary-fixed-dim": "#603a57", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#500016", + "error-dim": "#3d000f", + "on-error": "#ffced2", + "error-container": "#97283e", + "on-error-container": "#ffffff", + "success": "#002a18", + "on-success": "#7df0b4", + "success-container": "#005f3c", + "on-success-container": "#ffffff", + "warning": "#312100", + "on-warning": "#ffd486", + "warning-container": "#6c4d00", + "on-warning-container": "#ffffff", + "info": "#002252", + "on-info": "#ccdaff", + "info-container": "#004eac", + "on-info-container": "#ffffff", + "inverse-error": "#ffdddf", + "inverse-success": "#89fcbf", + "inverse-warning": "#ffe2b1", + "inverse-info": "#dde5ff" + }, + "dark": { + "background": "#0f0d12", + "on-background": "#ffffff", + "surface": "#0f0d12", + "surface-dim": "#0f0d12", + "surface-bright": "#2e2b34", + "surface-container-lowest": "#000000", + "surface-container-low": "#141218", + "surface-container": "#1b181f", + "surface-container-high": "#211e26", + "surface-container-highest": "#27242d", + "on-surface": "#ffffff", + "on-surface-variant": "#eae3ef", + "outline": "#bcb6c2", + "outline-variant": "#a7a1ad", + "inverse-surface": "#fdf7fe", + "inverse-on-surface": "#000000", + "primary": "#ebe1ff", + "primary-dim": "#ded0fe", + "on-primary": "#302649", + "primary-container": "#aa9dc8", + "on-primary-container": "#000000", + "primary-fixed": "#ded0fe", + "primary-fixed-dim": "#d0c3ef", + "on-primary-fixed": "#000000", + "on-primary-fixed-variant": "#180e30", + "inverse-primary": "#3c3256", + "secondary": "#ebe1fb", + "secondary-dim": "#ddd3ed", + "on-secondary": "#2e293c", + "secondary-container": "#a8a0b8", + "on-secondary-container": "#000000", + "secondary-fixed": "#e8def8", + "secondary-fixed-dim": "#dad0ea", + "on-secondary-fixed": "#000000", + "on-secondary-fixed-variant": "#221d2f", + "tertiary": "#ffdbf2", + "tertiary-dim": "#fac5e9", + "on-tertiary": "#43203b", + "tertiary-container": "#f4bfe3", + "on-tertiary-container": "#2e0e29", + "tertiary-fixed": "#f4bfe3", + "tertiary-fixed-dim": "#e5b2d5", + "on-tertiary-fixed": "#000000", + "on-tertiary-fixed-variant": "#180015", + "error": "#ffdddf", + "error-dim": "#ffc7cb", + "on-error": "#5f001c", + "error-container": "#ff798c", + "on-error-container": "#000000", + "success": "#89fcbf", + "on-success": "#00341e", + "success-container": "#42b880", + "on-success-container": "#000000", + "warning": "#ffe2b1", + "on-warning": "#3c2900", + "warning-container": "#e4a604", + "on-warning-container": "#000000", + "info": "#dde5ff", + "on-info": "#002a62", + "info-container": "#74a2ff", + "on-info-container": "#000000", + "inverse-error": "#500016", + "inverse-success": "#002a18", + "inverse-warning": "#312100", + "inverse-info": "#002252" + } + } + }, "light": { "background": "#fdf7fe", "on-background": "#34313a", @@ -53,22 +328,22 @@ "on-error": "#fff7f7", "error-container": "#f97386", "on-error-container": "#6e0523", - "success": "#006c45", - "on-success": "#ffffff", + "success": "#006d46", + "on-success": "#e7ffed", "success-container": "#86f9bc", - "on-success-container": "#002112", - "warning": "#7c5800", - "on-warning": "#ffffff", - "warning-container": "#ffdea6", - "on-warning-container": "#271900", - "info": "#005ac4", - "on-info": "#ffffff", - "info-container": "#d8e2ff", - "on-info-container": "#001a42", + "on-success-container": "#00734a", + "warning": "#7c5900", + "on-warning": "#fff8f1", + "warning-container": "#fab925", + "on-warning-container": "#6a4b00", + "info": "#005bc5", + "on-info": "#f9f8ff", + "info-container": "#1c7afc", + "on-info-container": "#001435", "inverse-error": "#f97386", - "inverse-success": "#69dca1", - "inverse-warning": "#fdbb28", - "inverse-info": "#aec6ff" + "inverse-success": "#3bb27b", + "inverse-warning": "#f3b31e", + "inverse-info": "#699cff" }, "dark": { "background": "#0f0d12", @@ -120,21 +395,21 @@ "on-error": "#490013", "error-container": "#871c34", "on-error-container": "#ff97a3", - "success": "#69dca1", - "on-success": "#003822", - "success-container": "#005233", - "on-success-container": "#86f9bc", - "warning": "#fdbb28", - "on-warning": "#412d00", - "warning-container": "#5e4200", - "on-warning-container": "#ffdea6", - "info": "#aec6ff", - "on-info": "#002e6a", - "info-container": "#004396", - "on-info-container": "#d8e2ff", + "success": "#3bb27b", + "on-success": "#002615", + "success-container": "#059460", + "on-success-container": "#001e10", + "warning": "#f3b31e", + "on-warning": "#4e3600", + "warning-container": "#e4a604", + "on-warning-container": "#593f00", + "info": "#699cff", + "on-info": "#001e4b", + "info-container": "#0c74f6", + "on-info-container": "#000a23", "inverse-error": "#a8364b", - "inverse-success": "#006c45", - "inverse-warning": "#7c5800", - "inverse-info": "#005ac4" + "inverse-success": "#006d46", + "inverse-warning": "#7c5900", + "inverse-info": "#005bc5" } } diff --git a/resources/node/scheme.mjs b/resources/node/scheme.mjs index 900b6fc5..7de75751 100644 --- a/resources/node/scheme.mjs +++ b/resources/node/scheme.mjs @@ -1,5 +1,5 @@ -function z(r){return r<0?-1:r===0?0:1}function at(r,t,e){return(1-e)*r+e*t}function oe(r,t,e){return et?t:e}function H(r,t,e){return et?t:e}function ut(r){return r=r%360,r<0&&(r=r+360),r}function U(r){return r=r%360,r<0&&(r=r+360),r}function ie(r,t){return U(t-r)<=180?1:-1}function vt(r,t){return 180-Math.abs(Math.abs(r-t)-180)}function pt(r,t){let e=r[0]*t[0][0]+r[1]*t[0][1]+r[2]*t[0][2],n=r[0]*t[1][0]+r[1]*t[1][1]+r[2]*t[1][2],a=r[0]*t[2][0]+r[1]*t[2][1]+r[2]*t[2][2];return[e,n,a]}var se=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],De=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],ce=[95.047,100,108.883];function wt(r,t,e){return(255<<24|(r&255)<<16|(t&255)<<8|e&255)>>>0}function jt(r){let t=ot(r[0]),e=ot(r[1]),n=ot(r[2]);return wt(t,e,n)}function gt(r){return r>>16&255}function yt(r){return r>>8&255}function Pt(r){return r&255}function ue(r,t,e){let n=De,a=n[0][0]*r+n[0][1]*t+n[0][2]*e,o=n[1][0]*r+n[1][1]*t+n[1][2]*e,i=n[2][0]*r+n[2][1]*t+n[2][2]*e,l=ot(a),m=ot(o),d=ot(i);return wt(l,m,d)}function ke(r){let t=J(gt(r)),e=J(yt(r)),n=J(Pt(r));return pt([t,e,n],se)}function Wt(r){let t=J(gt(r)),e=J(yt(r)),n=J(Pt(r)),a=se,o=a[0][0]*t+a[0][1]*e+a[0][2]*n,i=a[1][0]*t+a[1][1]*e+a[1][2]*n,l=a[2][0]*t+a[2][1]*e+a[2][2]*n,m=ce,d=o/m[0],g=i/m[1],S=l/m[2],y=dt(d),P=dt(g),f=dt(S),h=116*P-16,C=500*(y-P),v=200*(P-f);return[h,C,v]}function le(r){let t=q(r),e=ot(t);return wt(e,e,e)}function Ct(r){let t=ke(r)[1];return 116*dt(t/100)-16}function q(r){return 100*be((r+16)/116)}function St(r){return dt(r/100)*116-16}function J(r){let t=r/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function ot(r){let t=r/100,e=0;return t<=.0031308?e=t*12.92:e=1.055*Math.pow(t,1/2.4)-.055,oe(0,255,Math.round(e*255))}function he(){return ce}function dt(r){let t=.008856451679035631,e=24389/27;return r>t?Math.pow(r,1/3):(e*r+16)/116}function be(r){let t=.008856451679035631,e=24389/27,n=r*r*r;return n>t?n:(116*r-16)/e}var Y=class r{static make(t=he(),e=200/Math.PI*q(50)/100,n=50,a=2,o=!1){let i=t,l=i[0]*.401288+i[1]*.650173+i[2]*-.051461,m=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,d=i[0]*-.002079+i[1]*.048952+i[2]*.953127,g=.8+a/10,S=g>=.9?at(.59,.69,(g-.9)*10):at(.525,.59,(g-.8)*10),y=o?1:g*(1-1/3.6*Math.exp((-e-42)/92));y=y>1?1:y<0?0:y;let P=g,f=[y*(100/l)+1-y,y*(100/m)+1-y,y*(100/d)+1-y],h=1/(5*e+1),C=h*h*h*h,v=1-C,F=C*e+.1*v*v*Math.cbrt(5*e),I=q(n)/t[1],B=1.48+Math.sqrt(I),O=.725/Math.pow(I,.2),R=O,E=[Math.pow(F*f[0]*l/100,.42),Math.pow(F*f[1]*m/100,.42),Math.pow(F*f[2]*d/100,.42)],N=[400*E[0]/(E[0]+27.13),400*E[1]/(E[1]+27.13),400*E[2]/(E[2]+27.13)],_=(2*N[0]+N[1]+.05*N[2])*O;return new r(I,_,O,R,S,P,f,F,Math.pow(F,.25),B)}constructor(t,e,n,a,o,i,l,m,d,g){this.n=t,this.aw=e,this.nbb=n,this.ncb=a,this.c=o,this.nc=i,this.rgbD=l,this.fl=m,this.fLRoot=d,this.z=g}};Y.DEFAULT=Y.make();var G=class r{constructor(t,e,n,a,o,i,l,m,d){this.hue=t,this.chroma=e,this.j=n,this.q=a,this.m=o,this.s=i,this.jstar=l,this.astar=m,this.bstar=d}distance(t){let e=this.jstar-t.jstar,n=this.astar-t.astar,a=this.bstar-t.bstar,o=Math.sqrt(e*e+n*n+a*a);return 1.41*Math.pow(o,.63)}static fromInt(t){return r.fromIntInViewingConditions(t,Y.DEFAULT)}static fromIntInViewingConditions(t,e){let n=(t&16711680)>>16,a=(t&65280)>>8,o=t&255,i=J(n),l=J(a),m=J(o),d=.41233895*i+.35762064*l+.18051042*m,g=.2126*i+.7152*l+.0722*m,S=.01932141*i+.11916382*l+.95034478*m,y=.401288*d+.650173*g-.051461*S,P=-.250268*d+1.204414*g+.045854*S,f=-.002079*d+.048952*g+.953127*S,h=e.rgbD[0]*y,C=e.rgbD[1]*P,v=e.rgbD[2]*f,F=Math.pow(e.fl*Math.abs(h)/100,.42),I=Math.pow(e.fl*Math.abs(C)/100,.42),B=Math.pow(e.fl*Math.abs(v)/100,.42),O=z(h)*400*F/(F+27.13),R=z(C)*400*I/(I+27.13),E=z(v)*400*B/(B+27.13),N=(11*O+-12*R+E)/11,_=(O+R-2*E)/9,L=(20*O+20*R+21*E)/20,Z=(40*O+20*R+E)/20,ct=Math.atan2(_,N)*180/Math.PI,X=U(ct),Tt=X*Math.PI/180,Dt=Z*e.nbb,rt=100*Math.pow(Dt/e.aw,e.c*e.z),kt=4/e.c*Math.sqrt(rt/100)*(e.aw+4)*e.fLRoot,Yt=X<20.14?X+360:X,Kt=.25*(Math.cos(Yt*Math.PI/180+2)+3.8),qt=5e4/13*Kt*e.nc*e.ncb*Math.sqrt(N*N+_*_)/(L+.305),bt=Math.pow(qt,.9)*Math.pow(1.64-Math.pow(.29,e.n),.73),re=bt*Math.sqrt(rt/100),ne=re*e.fLRoot,Se=50*Math.sqrt(bt*e.c/(e.aw+4)),xe=(1+100*.007)*rt/(1+.007*rt),ae=1/.0228*Math.log(1+.0228*ne),Ae=ae*Math.cos(Tt),Te=ae*Math.sin(Tt);return new r(X,re,rt,kt,ne,Se,xe,Ae,Te)}static fromJch(t,e,n){return r.fromJchInViewingConditions(t,e,n,Y.DEFAULT)}static fromJchInViewingConditions(t,e,n,a){let o=4/a.c*Math.sqrt(t/100)*(a.aw+4)*a.fLRoot,i=e*a.fLRoot,l=e/Math.sqrt(t/100),m=50*Math.sqrt(l*a.c/(a.aw+4)),d=n*Math.PI/180,g=(1+100*.007)*t/(1+.007*t),S=1/.0228*Math.log(1+.0228*i),y=S*Math.cos(d),P=S*Math.sin(d);return new r(n,e,t,o,i,m,g,y,P)}static fromUcs(t,e,n){return r.fromUcsInViewingConditions(t,e,n,Y.DEFAULT)}static fromUcsInViewingConditions(t,e,n,a){let o=e,i=n,l=Math.sqrt(o*o+i*i),d=(Math.exp(l*.0228)-1)/.0228/a.fLRoot,g=Math.atan2(i,o)*(180/Math.PI);g<0&&(g+=360);let S=t/(1-(t-100)*.007);return r.fromJchInViewingConditions(S,d,g,a)}toInt(){return this.viewed(Y.DEFAULT)}viewed(t){let e=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(e/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),a=this.hue*Math.PI/180,o=.25*(Math.cos(a+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),l=o*(5e4/13)*t.nc*t.ncb,m=i/t.nbb,d=Math.sin(a),g=Math.cos(a),S=23*(m+.305)*n/(23*l+11*n*g+108*n*d),y=S*g,P=S*d,f=(460*m+451*y+288*P)/1403,h=(460*m-891*y-261*P)/1403,C=(460*m-220*y-6300*P)/1403,v=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),F=z(f)*(100/t.fl)*Math.pow(v,1/.42),I=Math.max(0,27.13*Math.abs(h)/(400-Math.abs(h))),B=z(h)*(100/t.fl)*Math.pow(I,1/.42),O=Math.max(0,27.13*Math.abs(C)/(400-Math.abs(C))),R=z(C)*(100/t.fl)*Math.pow(O,1/.42),E=F/t.rgbD[0],N=B/t.rgbD[1],_=R/t.rgbD[2],L=1.86206786*E-1.01125463*N+.14918677*_,Z=.38752654*E+.62144744*N-.00897398*_,et=-.0158415*E-.03412294*N+1.04996444*_;return ue(L,Z,et)}static fromXyzInViewingConditions(t,e,n,a){let o=.401288*t+.650173*e-.051461*n,i=-.250268*t+1.204414*e+.045854*n,l=-.002079*t+.048952*e+.953127*n,m=a.rgbD[0]*o,d=a.rgbD[1]*i,g=a.rgbD[2]*l,S=Math.pow(a.fl*Math.abs(m)/100,.42),y=Math.pow(a.fl*Math.abs(d)/100,.42),P=Math.pow(a.fl*Math.abs(g)/100,.42),f=z(m)*400*S/(S+27.13),h=z(d)*400*y/(y+27.13),C=z(g)*400*P/(P+27.13),v=(11*f+-12*h+C)/11,F=(f+h-2*C)/9,I=(20*f+20*h+21*C)/20,B=(40*f+20*h+C)/20,R=Math.atan2(F,v)*180/Math.PI,E=R<0?R+360:R>=360?R-360:R,N=E*Math.PI/180,_=B*a.nbb,L=100*Math.pow(_/a.aw,a.c*a.z),Z=4/a.c*Math.sqrt(L/100)*(a.aw+4)*a.fLRoot,et=E<20.14?E+360:E,ct=1/4*(Math.cos(et*Math.PI/180+2)+3.8),Tt=5e4/13*ct*a.nc*a.ncb*Math.sqrt(v*v+F*F)/(I+.305),Dt=Math.pow(Tt,.9)*Math.pow(1.64-Math.pow(.29,a.n),.73),rt=Dt*Math.sqrt(L/100),kt=rt*a.fLRoot,Yt=50*Math.sqrt(Dt*a.c/(a.aw+4)),Kt=(1+100*.007)*L/(1+.007*L),Xt=Math.log(1+.0228*kt)/.0228,qt=Xt*Math.cos(N),bt=Xt*Math.sin(N);return new r(E,rt,L,Z,kt,Yt,Kt,qt,bt)}xyzInViewingConditions(t){let e=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(e/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),a=this.hue*Math.PI/180,o=.25*(Math.cos(a+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),l=o*(5e4/13)*t.nc*t.ncb,m=i/t.nbb,d=Math.sin(a),g=Math.cos(a),S=23*(m+.305)*n/(23*l+11*n*g+108*n*d),y=S*g,P=S*d,f=(460*m+451*y+288*P)/1403,h=(460*m-891*y-261*P)/1403,C=(460*m-220*y-6300*P)/1403,v=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),F=z(f)*(100/t.fl)*Math.pow(v,1/.42),I=Math.max(0,27.13*Math.abs(h)/(400-Math.abs(h))),B=z(h)*(100/t.fl)*Math.pow(I,1/.42),O=Math.max(0,27.13*Math.abs(C)/(400-Math.abs(C))),R=z(C)*(100/t.fl)*Math.pow(O,1/.42),E=F/t.rgbD[0],N=B/t.rgbD[1],_=R/t.rgbD[2],L=1.86206786*E-1.01125463*N+.14918677*_,Z=.38752654*E+.62144744*N-.00897398*_,et=-.0158415*E-.03412294*N+1.04996444*_;return[L,Z,et]}};var W=class r{static sanitizeRadians(t){return(t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let e=t/100,n=0;return e<=.0031308?n=e*12.92:n=1.055*Math.pow(e,1/2.4)-.055,n*255}static chromaticAdaptation(t){let e=Math.pow(Math.abs(t),.42);return z(t)*400*e/(e+27.13)}static hueOf(t){let e=pt(t,r.SCALED_DISCOUNT_FROM_LINRGB),n=r.chromaticAdaptation(e[0]),a=r.chromaticAdaptation(e[1]),o=r.chromaticAdaptation(e[2]),i=(11*n+-12*a+o)/11,l=(n+a-2*o)/9;return Math.atan2(l,i)}static areInCyclicOrder(t,e,n){let a=r.sanitizeRadians(e-t),o=r.sanitizeRadians(n-t);return a100.01||L[1]>100.01||L[2]>100.01?0:jt(L);a=a-(X-n)*a/(2*X)}return 0}static solveToInt(t,e,n){if(e<1e-4||n<1e-4||n>99.9999)return le(n);t=U(t);let a=t/180*Math.PI,o=q(n),i=r.findResultByJ(a,e,o);if(i!==0)return i;let l=r.bisectToLimit(o,a);return jt(l)}static solveToCam(t,e,n){return G.fromInt(r.solveToInt(t,e,n))}};W.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];W.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];W.Y_FROM_LINRGB=[.2126,.7152,.0722];W.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var x=class r{static from(t,e,n){return new r(W.solveToInt(t,e,n))}static fromInt(t){return new r(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(W.solveToInt(t,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(W.solveToInt(this.internalHue,t,this.internalTone))}get tone(){return this.internalTone}set tone(t){this.setInternalState(W.solveToInt(this.internalHue,this.internalChroma,t))}setValue(t,e){this[t]=e}toString(){return`HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(t){return t>=250&&t<270}static isYellow(t){return t>=105&&t<125}static isCyan(t){return t>=170&&t<207}constructor(t){this.argb=t;let e=G.fromInt(t);this.internalHue=e.hue,this.internalChroma=e.chroma,this.internalTone=Ct(t),this.argb=t}setInternalState(t){let e=G.fromInt(t);this.internalHue=e.hue,this.internalChroma=e.chroma,this.internalTone=Ct(t),this.argb=t}inViewingConditions(t){let n=G.fromInt(this.toInt()).xyzInViewingConditions(t),a=G.fromXyzInViewingConditions(n[0],n[1],n[2],Y.make());return r.from(a.hue,a.chroma,St(n[1]))}};var Ft=class r{static harmonize(t,e){let n=x.fromInt(t),a=x.fromInt(e),o=vt(n.hue,a.hue),i=Math.min(o*.5,15),l=U(n.hue+i*ie(n.hue,a.hue));return x.from(l,n.chroma,n.tone).toInt()}static hctHue(t,e,n){let a=r.cam16Ucs(t,e,n),o=G.fromInt(a),i=G.fromInt(t);return x.from(o.hue,i.chroma,Ct(t)).toInt()}static cam16Ucs(t,e,n){let a=G.fromInt(t),o=G.fromInt(e),i=a.jstar,l=a.astar,m=a.bstar,d=o.jstar,g=o.astar,S=o.bstar,y=i+(d-i)*n,P=l+(g-l)*n,f=m+(S-m)*n;return G.fromUcs(y,P,f).toInt()}};var V=class r{static ratioOfTones(t,e){return t=H(0,100,t),e=H(0,100,e),r.ratioOfYs(q(t),q(e))}static ratioOfYs(t,e){let n=t>e?t:e,a=n===e?t:e;return(n+5)/(a+5)}static lighter(t,e){if(t<0||t>100)return-1;let n=q(t),a=e*(n+5)-5,o=r.ratioOfYs(a,n),i=Math.abs(o-e);if(o.04)return-1;let l=St(a)+.4;return l<0||l>100?-1:l}static darker(t,e){if(t<0||t>100)return-1;let n=q(t),a=(n+5)/e-5,o=r.ratioOfYs(n,a),i=Math.abs(o-e);if(o.04)return-1;let l=St(a)-.4;return l<0||l>100?-1:l}static lighterUnsafe(t,e){let n=r.lighter(t,e);return n<0?100:n}static darkerUnsafe(t,e){let n=r.darker(t,e);return n<0?0:n}};var it=class r{static isDisliked(t){let e=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,n=Math.round(t.chroma)>16,a=Math.round(t.tone)<65;return e&&n&&a}static fixIfDisliked(t){return r.isDisliked(t)?x.from(t.hue,t.chroma,70):t}};function ve(r,t,e){if(r.name!==e.name)throw new Error(`Attempting to extend color ${r.name} with color ${e.name} of different name for spec version ${t}.`);if(r.isBackground!==e.isBackground)throw new Error(`Attempting to extend color ${r.name} as a ${r.isBackground?"background":"foreground"} with color ${e.name} as a ${e.isBackground?"background":"foreground"} for spec version ${t}.`)}function k(r,t,e){return ve(r,t,e),c.fromPalette({name:r.name,palette:n=>n.specVersion===t?e.palette(n):r.palette(n),tone:n=>n.specVersion===t?e.tone(n):r.tone(n),isBackground:r.isBackground,chromaMultiplier:n=>{let a=n.specVersion===t?e.chromaMultiplier:r.chromaMultiplier;return a!==void 0?a(n):1},background:n=>{let a=n.specVersion===t?e.background:r.background;return a!==void 0?a(n):void 0},secondBackground:n=>{let a=n.specVersion===t?e.secondBackground:r.secondBackground;return a!==void 0?a(n):void 0},contrastCurve:n=>{let a=n.specVersion===t?e.contrastCurve:r.contrastCurve;return a!==void 0?a(n):void 0},toneDeltaPair:n=>{let a=n.specVersion===t?e.toneDeltaPair:r.toneDeltaPair;return a!==void 0?a(n):void 0}})}var c=class r{static fromPalette(t){return new r(t.name??"",t.palette,t.tone??r.getInitialToneFromBackground(t.background),t.isBackground??!1,t.chromaMultiplier,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}static getInitialToneFromBackground(t){return t===void 0?e=>50:e=>t(e)?t(e).getTone(e):50}constructor(t,e,n,a,o,i,l,m,d){if(this.name=t,this.palette=e,this.tone=n,this.isBackground=a,this.chromaMultiplier=o,this.background=i,this.secondBackground=l,this.contrastCurve=m,this.toneDeltaPair=d,this.hctCache=new Map,!i&&l)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!i&&m)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(i&&!m)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return r.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear()}getArgb(t){return this.getHct(t).toInt()}getHct(t){let e=this.hctCache.get(t);if(e!=null)return e;let n=me(t.specVersion).getHct(t,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,n),n}getTone(t){return me(t.specVersion).getTone(t,this)}static foregroundTone(t,e){let n=V.lighterUnsafe(t,e),a=V.darkerUnsafe(t,e),o=V.ratioOfTones(n,t),i=V.ratioOfTones(a,t);if(r.tonePrefersLightForeground(t)){let m=Math.abs(o-i)<.1&&o=e||o>=i||m?n:a}else return i>=e||i>=o?a:n}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return r.tonePrefersLightForeground(t)&&!r.toneAllowsLightForeground(t)?49:t}},Jt=class{getHct(t,e){let n=e.getTone(t);return e.palette(t).getHct(n)}getTone(t,e){let n=t.contrastLevel<0,a=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(a){let o=a.roleA,i=a.roleB,l=a.delta,m=a.polarity,d=a.stayTogether,g=m==="nearer"||m==="lighter"&&!t.isDark||m==="darker"&&t.isDark,S=g?o:i,y=g?i:o,P=e.name===S.name,f=t.isDark?1:-1,h=S.tone(t),C=y.tone(t);if(e.background&&S.contrastCurve&&y.contrastCurve){let v=e.background(t),F=S.contrastCurve(t),I=y.contrastCurve(t);if(v&&F&&I){let B=v.getTone(t),O=F.get(t.contrastLevel),R=I.get(t.contrastLevel);V.ratioOfTones(B,h)=l||(h=H(0,100,C-l*f))),50<=h&&h<60?f>0?(h=60,C=Math.max(C,h+l*f)):(h=49,C=Math.min(C,h+l*f)):50<=C&&C<60&&(d?f>0?(h=60,C=Math.max(C,h+l*f)):(h=49,C=Math.min(C,h+l*f)):f>0?C=60:C=49),P?h:C}else{let o=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return o;let i=e.background(t).getTone(t),l=e.contrastCurve(t).get(t.contrastLevel);if(V.ratioOfTones(i,o)>=l||(o=c.foregroundTone(i,l)),n&&(o=c.foregroundTone(i,l)),e.isBackground&&50<=o&&o<60&&(V.ratioOfTones(49,i)>=l?o=49:o=60),e.secondBackground==null||e.secondBackground(t)===void 0)return o;let[m,d]=[e.background,e.secondBackground],[g,S]=[m(t).getTone(t),d(t).getTone(t)],[y,P]=[Math.max(g,S),Math.min(g,S)];if(V.ratioOfTones(y,o)>=l&&V.ratioOfTones(P,o)>=l)return o;let f=V.lighter(y,l),h=V.darker(P,l),C=[];return f!==-1&&C.push(f),h!==-1&&C.push(h),c.tonePrefersLightForeground(g)||c.tonePrefersLightForeground(S)?f<0?100:f:C.length===1?C[0]:h<0?0:h}}},Zt=class{getHct(t,e){let n=e.palette(t),a=e.getTone(t),o=n.hue,i=n.chroma*(e.chromaMultiplier?e.chromaMultiplier(t):1);return x.from(o,i,a)}getTone(t,e){let n=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(n){let a=n.roleA,o=n.roleB,i=n.polarity,l=n.constraint,m=i==="darker"||i==="relative_lighter"&&t.isDark||i==="relative_darker"&&!t.isDark?-n.delta:n.delta,d=e.name===a.name,g=d?a:o,S=d?o:a,y=g.tone(t),P=S.getTone(t),f=m*(d?1:-1);if(l==="exact"?y=H(0,100,P+f):l==="nearer"?f>0?y=H(0,100,H(P,P+f,y)):y=H(0,100,H(P+f,P,y)):l==="farther"&&(f>0?y=H(P+f,100,y):y=H(0,P+f,y)),e.background&&e.contrastCurve){let h=e.background(t),C=e.contrastCurve(t);if(h&&C){let v=h.getTone(t),F=C.get(t.contrastLevel);y=V.ratioOfTones(v,y)>=F&&t.contrastLevel>=0?y:c.foregroundTone(v,F)}}return e.isBackground&&!e.name.endsWith("_fixed_dim")&&(y>=57?y=H(65,100,y):y=H(0,49,y)),y}else{let a=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return a;let o=e.background(t).getTone(t),i=e.contrastCurve(t).get(t.contrastLevel);if(a=V.ratioOfTones(o,a)>=i&&t.contrastLevel>=0?a:c.foregroundTone(o,i),e.isBackground&&!e.name.endsWith("_fixed_dim")&&(a>=57?a=H(65,100,a):a=H(0,49,a)),e.secondBackground==null||e.secondBackground(t)===void 0)return a;let[l,m]=[e.background,e.secondBackground],[d,g]=[l(t).getTone(t),m(t).getTone(t)],[S,y]=[Math.max(d,g),Math.min(d,g)];if(V.ratioOfTones(S,a)>=i&&V.ratioOfTones(y,a)>=i)return a;let P=V.lighter(S,i),f=V.darker(y,i),h=[];return P!==-1&&h.push(P),f!==-1&&h.push(f),c.tonePrefersLightForeground(d)||c.tonePrefersLightForeground(g)?P<0?100:P:h.length===1?h[0]:f<0?0:f}}},we=new Jt,Fe=new Zt;function me(r){return r==="2025"?Fe:we}var p=class r{static fromInt(t){let e=x.fromInt(t);return r.fromHct(e)}static fromHct(t){return new r(t.hue,t.chroma,t)}static fromHueAndChroma(t,e){let n=new Qt(t,e).create();return new r(t,e,n)}constructor(t,e,n){this.hue=t,this.chroma=e,this.keyColor=n,this.cache=new Map}tone(t){let e=this.cache.get(t);return e===void 0&&(t==99&&x.isYellow(this.hue)?e=this.averageArgb(this.tone(98),this.tone(100)):e=x.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,e)),e}getHct(t){return x.fromInt(this.tone(t))}averageArgb(t,e){let n=t>>>16&255,a=t>>>8&255,o=t&255,i=e>>>16&255,l=e>>>8&255,m=e&255,d=Math.round((n+i)/2),g=Math.round((a+l)/2),S=Math.round((o+m)/2);return(255<<24|(d&255)<<16|(g&255)<<8|S&255)>>>0}},Qt=class{constructor(t,e){this.hue=t,this.requestedChroma=e,this.chromaCache=new Map,this.maxChromaValue=200}create(){let a=0,o=100;for(;a=this.requestedChroma-.01)if(Math.abs(a-50)0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),e=this.tempsByHct;return t.sort((n,a)=>e.get(n)-e.get(a)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,e=12){let n=Math.round(this.input.hue),a=this.hctsByHue[n],o=this.relativeTemperature(a),i=[a],l=0;for(let f=0;f<360;f++){let h=ut(n+f),C=this.hctsByHue[h],v=this.relativeTemperature(C),F=Math.abs(v-o);o=v,l+=F}let m=1,d=l/e,g=0;for(o=this.relativeTemperature(a);i.length=F,B=1;for(;I&&i.length=O,B++}if(o=C,m++,m>360){for(;i.length=i.length&&(h=h%i.length),S.splice(0,0,i[h])}let P=t-y-1;for(let f=1;f=i.length&&(h=h%i.length),S.push(i[h])}return S}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,e=this.tempsByHct.get(this.coldest),n=this.warmest.hue,o=this.tempsByHct.get(this.warmest)-e,i=r.isBetween(this.input.hue,t,n),l=i?n:t,m=i?t:n,d=1,g=1e3,S=this.hctsByHue[Math.round(this.input.hue)],y=1-this.inputRelativeTemperature;for(let P=0;P<=360;P+=1){let f=U(l+d*P);if(!r.isBetween(f,l,m))continue;let h=this.hctsByHue[Math.round(f)],C=(this.tempsByHct.get(h)-e)/o,v=Math.abs(y-C);v=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),e=new Map;for(let n of t)e.set(n,r.rawTemperature(n));return this.tempsByHctCache=e,e}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let e=0;e<=360;e+=1){let n=x.from(e,this.input.chroma,this.input.tone);t.push(n)}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,e,n){return el.chroma||Math.abs(l.chroma-t)<.4)break;let m=Math.abs(l.chroma-t),d=Math.abs(o.chroma-t);mt.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return c.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return c.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return c.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return c.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return c.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return c.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:!0})}onBackground(){return c.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new A(3,3,4.5,7)})}surface(){return c.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:!0})}surfaceDim(){return c.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new A(87,87,80,75).get(t.contrastLevel),isBackground:!0})}surfaceBright(){return c.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new A(24,24,29,34).get(t.contrastLevel):98,isBackground:!0})}surfaceContainerLowest(){return c.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new A(4,4,2,0).get(t.contrastLevel):100,isBackground:!0})}surfaceContainerLow(){return c.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new A(10,10,11,12).get(t.contrastLevel):new A(96,96,96,95).get(t.contrastLevel),isBackground:!0})}surfaceContainer(){return c.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new A(12,12,16,20).get(t.contrastLevel):new A(94,94,92,90).get(t.contrastLevel),isBackground:!0})}surfaceContainerHigh(){return c.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new A(17,17,21,25).get(t.contrastLevel):new A(92,92,88,85).get(t.contrastLevel),isBackground:!0})}surfaceContainerHighest(){return c.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new A(22,22,26,30).get(t.contrastLevel):new A(90,90,84,80).get(t.contrastLevel),isBackground:!0})}onSurface(){return c.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new A(4.5,7,11,21)})}surfaceVariant(){return c.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:!0})}onSurfaceVariant(){return c.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new A(3,4.5,7,11)})}inverseSurface(){return c.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:!0})}inverseOnSurface(){return c.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new A(4.5,7,11,21)})}outline(){return c.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1.5,3,4.5,7)})}outlineVariant(){return c.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5)})}shadow(){return c.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return c.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return c.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:!0})}primary(){return c.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>M(t)?t.isDark?100:0:t.isDark?80:40,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(3,4.5,7,7),toneDeltaPair:t=>new w(this.primaryContainer(),this.primary(),10,"nearer",!1)})}primaryDim(){}onPrimary(){return c.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>M(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new A(4.5,7,11,21)})}primaryContainer(){return c.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>lt(t)?t.sourceColorHct.tone:M(t)?t.isDark?85:25:t.isDark?30:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.primaryContainer(),this.primary(),10,"nearer",!1)})}onPrimaryContainer(){return c.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>lt(t)?c.foregroundTone(this.primaryContainer().tone(t),4.5):M(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new A(3,4.5,7,11)})}inversePrimary(){return c.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new A(3,4.5,7,7)})}secondary(){return c.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(3,4.5,7,7),toneDeltaPair:t=>new w(this.secondaryContainer(),this.secondary(),10,"nearer",!1)})}secondaryDim(){}onSecondary(){return c.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>M(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new A(4.5,7,11,21)})}secondaryContainer(){return c.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let e=t.isDark?30:90;return M(t)?t.isDark?30:85:lt(t)?Ee(t.secondaryPalette.hue,t.secondaryPalette.chroma,e,!t.isDark):e},isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.secondaryContainer(),this.secondary(),10,"nearer",!1)})}onSecondaryContainer(){return c.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>M(t)?t.isDark?90:10:lt(t)?c.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new A(3,4.5,7,11)})}tertiary(){return c.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>M(t)?t.isDark?90:25:t.isDark?80:40,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(3,4.5,7,7),toneDeltaPair:t=>new w(this.tertiaryContainer(),this.tertiary(),10,"nearer",!1)})}tertiaryDim(){}onTertiary(){return c.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>M(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new A(4.5,7,11,21)})}tertiaryContainer(){return c.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(M(t))return t.isDark?60:49;if(!lt(t))return t.isDark?30:90;let e=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return it.fixIfDisliked(e).tone},isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.tertiaryContainer(),this.tertiary(),10,"nearer",!1)})}onTertiaryContainer(){return c.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>M(t)?t.isDark?0:100:lt(t)?c.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new A(3,4.5,7,11)})}error(){return c.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(3,4.5,7,7),toneDeltaPair:t=>new w(this.errorContainer(),this.error(),10,"nearer",!1)})}errorDim(){}onError(){return c.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new A(4.5,7,11,21)})}errorContainer(){return c.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.errorContainer(),this.error(),10,"nearer",!1)})}onErrorContainer(){return c.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>M(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new A(3,4.5,7,11)})}primaryFixed(){return c.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>M(t)?40:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",!0)})}primaryFixedDim(){return c.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>M(t)?30:80,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",!0)})}onPrimaryFixed(){return c.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>M(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new A(4.5,7,11,21)})}onPrimaryFixedVariant(){return c.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>M(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new A(3,4.5,7,11)})}secondaryFixed(){return c.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>M(t)?80:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",!0)})}secondaryFixedDim(){return c.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>M(t)?70:80,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",!0)})}onSecondaryFixed(){return c.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new A(4.5,7,11,21)})}onSecondaryFixedVariant(){return c.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>M(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new A(3,4.5,7,11)})}tertiaryFixed(){return c.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>M(t)?40:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",!0)})}tertiaryFixedDim(){return c.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>M(t)?30:80,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new A(1,1,3,4.5),toneDeltaPair:t=>new w(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",!0)})}onTertiaryFixed(){return c.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>M(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new A(4.5,7,11,21)})}onTertiaryFixedVariant(){return c.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>M(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new A(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function b(r,t=0,e=100,n=1){let a=fe(r.hue,r.chroma*n,100,!0);return H(t,e,a)}function nt(r,t=0,e=100){let n=fe(r.hue,r.chroma,0,!1);return H(t,e,n)}function fe(r,t,e,n){let a=e,o=x.from(r,t,a);for(;o.chroma100);){e+=n?-1:1;let i=x.from(r,t,e);o.chromae.neutralPalette,tone:e=>(super.surface().tone(e),e.platform==="phone"?e.isDark?4:x.isYellow(e.neutralPalette.hue)?99:e.variant===s.VIBRANT?97:98:0),isBackground:!0});return k(super.surface(),"2025",t)}surfaceDim(){let t=c.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:x.isYellow(e.neutralPalette.hue)?90:e.variant===s.VIBRANT?85:87,isBackground:!0,chromaMultiplier:e=>{if(!e.isDark){if(e.variant===s.NEUTRAL)return 2.5;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===s.VIBRANT)return 1.36}return 1}});return k(super.surfaceDim(),"2025",t)}surfaceBright(){let t=c.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?18:x.isYellow(e.neutralPalette.hue)?99:e.variant===s.VIBRANT?97:98,isBackground:!0,chromaMultiplier:e=>{if(e.isDark){if(e.variant===s.NEUTRAL)return 2.5;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===s.VIBRANT)return 1.36}return 1}});return k(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=c.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?0:100,isBackground:!0});return k(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=c.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?6:x.isYellow(e.neutralPalette.hue)?98:e.variant===s.VIBRANT?95:96:15,isBackground:!0,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.3;if(e.variant===s.TONAL_SPOT)return 1.25;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?1.3:1.15;if(e.variant===s.VIBRANT)return 1.08}return 1}});return k(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=c.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?9:x.isYellow(e.neutralPalette.hue)?96:e.variant===s.VIBRANT?92:94:20,isBackground:!0,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.6;if(e.variant===s.TONAL_SPOT)return 1.4;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?1.6:1.3;if(e.variant===s.VIBRANT)return 1.15}return 1}});return k(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=c.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?12:x.isYellow(e.neutralPalette.hue)?94:e.variant===s.VIBRANT?90:92:25,isBackground:!0,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.9;if(e.variant===s.TONAL_SPOT)return 1.5;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?1.95:1.45;if(e.variant===s.VIBRANT)return 1.22}return 1}});return k(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=c.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?15:x.isYellow(e.neutralPalette.hue)?92:e.variant===s.VIBRANT?88:90,isBackground:!0,chromaMultiplier:e=>e.variant===s.NEUTRAL?2.2:e.variant===s.TONAL_SPOT?1.7:e.variant===s.EXPRESSIVE?x.isYellow(e.neutralPalette.hue)?2.3:1.6:e.variant===s.VIBRANT?1.29:1});return k(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=c.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.variant===s.VIBRANT?b(e.neutralPalette,0,100,1.1):c.getInitialToneFromBackground(n=>n.platform==="phone"?this.highestSurface(n):this.surfaceContainerHigh())(e),chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.isDark&&e.platform==="phone"?T(11):T(9)});return k(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=c.fromPalette({name:"on_surface_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?e.isDark?T(6):T(4.5):T(7)});return k(super.onSurfaceVariant(),"2025",t)}outline(){let t=c.fromPalette({name:"outline",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(3):T(4.5)});return k(super.outline(),"2025",t)}outlineVariant(){let t=c.fromPalette({name:"outline_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(1.5):T(3)});return k(super.outlineVariant(),"2025",t)}inverseSurface(){let t=c.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?98:4,isBackground:!0});return k(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=c.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,background:e=>this.inverseSurface(),contrastCurve:e=>T(7)});return k(super.inverseOnSurface(),"2025",t)}primary(){let t=c.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>e.variant===s.NEUTRAL?e.platform==="phone"?e.isDark?80:40:90:e.variant===s.TONAL_SPOT?e.platform==="phone"?e.isDark?80:b(e.primaryPalette):b(e.primaryPalette,0,90):e.variant===s.EXPRESSIVE?e.platform==="phone"?b(e.primaryPalette,0,x.isYellow(e.primaryPalette.hue)?25:x.isCyan(e.primaryPalette.hue)?88:98):b(e.primaryPalette):e.platform==="phone"?b(e.primaryPalette,0,x.isCyan(e.primaryPalette.hue)?88:98):b(e.primaryPalette),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7),toneDeltaPair:e=>e.platform==="phone"?new w(this.primaryContainer(),this.primary(),5,"relative_lighter",!0,"farther"):void 0});return k(super.primary(),"2025",t)}primaryDim(){return c.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===s.NEUTRAL?85:t.variant===s.TONAL_SPOT?b(t.primaryPalette,0,90):b(t.primaryPalette),isBackground:!0,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>T(4.5),toneDeltaPair:t=>new w(this.primaryDim(),this.primary(),5,"darker",!0,"farther")})}onPrimary(){let t=c.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,background:e=>e.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onPrimary(),"2025",t)}primaryContainer(){let t=c.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>e.platform==="watch"?30:e.variant===s.NEUTRAL?e.isDark?30:90:e.variant===s.TONAL_SPOT?e.isDark?nt(e.primaryPalette,35,93):b(e.primaryPalette,0,90):e.variant===s.EXPRESSIVE?e.isDark?b(e.primaryPalette,30,93):b(e.primaryPalette,78,x.isCyan(e.primaryPalette.hue)?88:90):e.isDark?nt(e.primaryPalette,66,93):b(e.primaryPalette,66,x.isCyan(e.primaryPalette.hue)?88:93),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="phone"?void 0:new w(this.primaryContainer(),this.primaryDim(),10,"darker",!0,"farther"),contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=c.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,background:e=>this.primaryContainer(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=c.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.primaryContainer().getTone(n)},isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=c.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>this.primaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new w(this.primaryFixedDim(),this.primaryFixed(),5,"darker",!0,"exact")});return k(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=c.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>T(7)});return k(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=c.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>T(4.5)});return k(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=c.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>b(e.primaryPalette),background:e=>this.inverseSurface(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.inversePrimary(),"2025",t)}secondary(){let t=c.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?e.variant===s.NEUTRAL?90:b(e.secondaryPalette,0,90):e.variant===s.NEUTRAL?e.isDark?nt(e.secondaryPalette,0,98):b(e.secondaryPalette):e.variant===s.VIBRANT?b(e.secondaryPalette,0,e.isDark?90:98):e.isDark?80:b(e.secondaryPalette),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7),toneDeltaPair:e=>e.platform==="phone"?new w(this.secondaryContainer(),this.secondary(),5,"relative_lighter",!0,"farther"):void 0});return k(super.secondary(),"2025",t)}secondaryDim(){return c.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===s.NEUTRAL?85:b(t.secondaryPalette,0,90),isBackground:!0,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>T(4.5),toneDeltaPair:t=>new w(this.secondaryDim(),this.secondary(),5,"darker",!0,"farther")})}onSecondary(){let t=c.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,background:e=>e.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onSecondary(),"2025",t)}secondaryContainer(){let t=c.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?30:e.variant===s.VIBRANT?e.isDark?nt(e.secondaryPalette,30,40):b(e.secondaryPalette,84,90):e.variant===s.EXPRESSIVE?e.isDark?15:b(e.secondaryPalette,90,95):e.isDark?25:90,isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new w(this.secondaryContainer(),this.secondaryDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=c.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,background:e=>this.secondaryContainer(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=c.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.secondaryContainer().getTone(n)},isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=c.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>this.secondaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new w(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",!0,"exact")});return k(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=c.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>T(7)});return k(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=c.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>T(4.5)});return k(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=c.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===s.TONAL_SPOT?b(e.tertiaryPalette,0,90):b(e.tertiaryPalette):e.variant===s.EXPRESSIVE||e.variant===s.VIBRANT?b(e.tertiaryPalette,0,x.isCyan(e.tertiaryPalette.hue)?88:e.isDark?98:100):e.isDark?b(e.tertiaryPalette,0,98):b(e.tertiaryPalette),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7),toneDeltaPair:e=>e.platform==="phone"?new w(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",!0,"farther"):void 0});return k(super.tertiary(),"2025",t)}tertiaryDim(){return c.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===s.TONAL_SPOT?b(t.tertiaryPalette,0,90):b(t.tertiaryPalette),isBackground:!0,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>T(4.5),toneDeltaPair:t=>new w(this.tertiaryDim(),this.tertiary(),5,"darker",!0,"farther")})}onTertiary(){let t=c.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,background:e=>e.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=c.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===s.TONAL_SPOT?b(e.tertiaryPalette,0,90):b(e.tertiaryPalette):e.variant===s.NEUTRAL?e.isDark?b(e.tertiaryPalette,0,93):b(e.tertiaryPalette,0,96):e.variant===s.TONAL_SPOT?b(e.tertiaryPalette,0,e.isDark?93:100):e.variant===s.EXPRESSIVE?b(e.tertiaryPalette,75,x.isCyan(e.tertiaryPalette.hue)?88:e.isDark?93:100):e.isDark?b(e.tertiaryPalette,0,93):b(e.tertiaryPalette,72,100),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new w(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=c.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryContainer(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=c.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.tertiaryContainer().getTone(n)},isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=c.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>this.tertiaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new w(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",!0,"exact")});return k(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=c.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>T(7)});return k(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=c.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>T(4.5)});return k(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=c.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.platform==="phone"?e.isDark?nt(e.errorPalette,0,98):b(e.errorPalette):nt(e.errorPalette),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7),toneDeltaPair:e=>e.platform==="phone"?new w(this.errorContainer(),this.error(),5,"relative_lighter",!0,"farther"):void 0});return k(super.error(),"2025",t)}errorDim(){return c.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>nt(t.errorPalette),isBackground:!0,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>T(4.5),toneDeltaPair:t=>new w(this.errorDim(),this.error(),5,"darker",!0,"farther")})}onError(){let t=c.fromPalette({name:"on_error",palette:e=>e.errorPalette,background:e=>e.platform==="phone"?this.error():this.errorDim(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onError(),"2025",t)}errorContainer(){let t=c.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.platform==="watch"?30:e.isDark?nt(e.errorPalette,30,93):b(e.errorPalette,0,90),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new w(this.errorContainer(),this.errorDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.errorContainer(),"2025",t)}onErrorContainer(){let t=c.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,background:e=>this.errorContainer(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7)});return k(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return k(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return k(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return k(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:e=>e.platform==="watch"?100:this.onSurface().getTone(e)});return k(super.onBackground(),"2025",t)}};var u=class r{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(t=>t!==void 0)}highestSurface(t){return r.colorSpec.highestSurface(t)}primaryPaletteKeyColor(){return r.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return r.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return r.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return r.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return r.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return r.colorSpec.errorPaletteKeyColor()}background(){return r.colorSpec.background()}onBackground(){return r.colorSpec.onBackground()}surface(){return r.colorSpec.surface()}surfaceDim(){return r.colorSpec.surfaceDim()}surfaceBright(){return r.colorSpec.surfaceBright()}surfaceContainerLowest(){return r.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return r.colorSpec.surfaceContainerLow()}surfaceContainer(){return r.colorSpec.surfaceContainer()}surfaceContainerHigh(){return r.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return r.colorSpec.surfaceContainerHighest()}onSurface(){return r.colorSpec.onSurface()}surfaceVariant(){return r.colorSpec.surfaceVariant()}onSurfaceVariant(){return r.colorSpec.onSurfaceVariant()}outline(){return r.colorSpec.outline()}outlineVariant(){return r.colorSpec.outlineVariant()}inverseSurface(){return r.colorSpec.inverseSurface()}inverseOnSurface(){return r.colorSpec.inverseOnSurface()}shadow(){return r.colorSpec.shadow()}scrim(){return r.colorSpec.scrim()}surfaceTint(){return r.colorSpec.surfaceTint()}primary(){return r.colorSpec.primary()}primaryDim(){return r.colorSpec.primaryDim()}onPrimary(){return r.colorSpec.onPrimary()}primaryContainer(){return r.colorSpec.primaryContainer()}onPrimaryContainer(){return r.colorSpec.onPrimaryContainer()}inversePrimary(){return r.colorSpec.inversePrimary()}primaryFixed(){return r.colorSpec.primaryFixed()}primaryFixedDim(){return r.colorSpec.primaryFixedDim()}onPrimaryFixed(){return r.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return r.colorSpec.onPrimaryFixedVariant()}secondary(){return r.colorSpec.secondary()}secondaryDim(){return r.colorSpec.secondaryDim()}onSecondary(){return r.colorSpec.onSecondary()}secondaryContainer(){return r.colorSpec.secondaryContainer()}onSecondaryContainer(){return r.colorSpec.onSecondaryContainer()}secondaryFixed(){return r.colorSpec.secondaryFixed()}secondaryFixedDim(){return r.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return r.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return r.colorSpec.onSecondaryFixedVariant()}tertiary(){return r.colorSpec.tertiary()}tertiaryDim(){return r.colorSpec.tertiaryDim()}onTertiary(){return r.colorSpec.onTertiary()}tertiaryContainer(){return r.colorSpec.tertiaryContainer()}onTertiaryContainer(){return r.colorSpec.onTertiaryContainer()}tertiaryFixed(){return r.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return r.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return r.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return r.colorSpec.onTertiaryFixedVariant()}error(){return r.colorSpec.error()}errorDim(){return r.colorSpec.errorDim()}onError(){return r.colorSpec.onError()}errorContainer(){return r.colorSpec.errorContainer()}onErrorContainer(){return r.colorSpec.onErrorContainer()}static highestSurface(t){return r.colorSpec.highestSurface(t)}};u.contentAccentToneDelta=15;u.colorSpec=new It;u.primaryPaletteKeyColor=u.colorSpec.primaryPaletteKeyColor();u.secondaryPaletteKeyColor=u.colorSpec.secondaryPaletteKeyColor();u.tertiaryPaletteKeyColor=u.colorSpec.tertiaryPaletteKeyColor();u.neutralPaletteKeyColor=u.colorSpec.neutralPaletteKeyColor();u.neutralVariantPaletteKeyColor=u.colorSpec.neutralVariantPaletteKeyColor();u.background=u.colorSpec.background();u.onBackground=u.colorSpec.onBackground();u.surface=u.colorSpec.surface();u.surfaceDim=u.colorSpec.surfaceDim();u.surfaceBright=u.colorSpec.surfaceBright();u.surfaceContainerLowest=u.colorSpec.surfaceContainerLowest();u.surfaceContainerLow=u.colorSpec.surfaceContainerLow();u.surfaceContainer=u.colorSpec.surfaceContainer();u.surfaceContainerHigh=u.colorSpec.surfaceContainerHigh();u.surfaceContainerHighest=u.colorSpec.surfaceContainerHighest();u.onSurface=u.colorSpec.onSurface();u.surfaceVariant=u.colorSpec.surfaceVariant();u.onSurfaceVariant=u.colorSpec.onSurfaceVariant();u.inverseSurface=u.colorSpec.inverseSurface();u.inverseOnSurface=u.colorSpec.inverseOnSurface();u.outline=u.colorSpec.outline();u.outlineVariant=u.colorSpec.outlineVariant();u.shadow=u.colorSpec.shadow();u.scrim=u.colorSpec.scrim();u.surfaceTint=u.colorSpec.surfaceTint();u.primary=u.colorSpec.primary();u.onPrimary=u.colorSpec.onPrimary();u.primaryContainer=u.colorSpec.primaryContainer();u.onPrimaryContainer=u.colorSpec.onPrimaryContainer();u.inversePrimary=u.colorSpec.inversePrimary();u.secondary=u.colorSpec.secondary();u.onSecondary=u.colorSpec.onSecondary();u.secondaryContainer=u.colorSpec.secondaryContainer();u.onSecondaryContainer=u.colorSpec.onSecondaryContainer();u.tertiary=u.colorSpec.tertiary();u.onTertiary=u.colorSpec.onTertiary();u.tertiaryContainer=u.colorSpec.tertiaryContainer();u.onTertiaryContainer=u.colorSpec.onTertiaryContainer();u.error=u.colorSpec.error();u.onError=u.colorSpec.onError();u.errorContainer=u.colorSpec.errorContainer();u.onErrorContainer=u.colorSpec.onErrorContainer();u.primaryFixed=u.colorSpec.primaryFixed();u.primaryFixedDim=u.colorSpec.primaryFixedDim();u.onPrimaryFixed=u.colorSpec.onPrimaryFixed();u.onPrimaryFixedVariant=u.colorSpec.onPrimaryFixedVariant();u.secondaryFixed=u.colorSpec.secondaryFixed();u.secondaryFixedDim=u.colorSpec.secondaryFixedDim();u.onSecondaryFixed=u.colorSpec.onSecondaryFixed();u.onSecondaryFixedVariant=u.colorSpec.onSecondaryFixedVariant();u.tertiaryFixed=u.colorSpec.tertiaryFixed();u.tertiaryFixedDim=u.colorSpec.tertiaryFixedDim();u.onTertiaryFixed=u.colorSpec.onTertiaryFixed();u.onTertiaryFixedVariant=u.colorSpec.onTertiaryFixedVariant();var D=class r{static maybeFallbackSpecVersion(t,e){switch(e){case s.EXPRESSIVE:case s.VIBRANT:case s.TONAL_SPOT:case s.NEUTRAL:return t;default:return"2021"}}constructor(t){this.sourceColorArgb=t.sourceColorHct.toInt(),this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.platform=t.platform??"phone",this.specVersion=r.maybeFallbackSpecVersion(t.specVersion??"2021",this.variant),this.sourceColorHct=t.sourceColorHct,this.primaryPalette=t.primaryPalette??ht(this.specVersion).getPrimaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=t.secondaryPalette??ht(this.specVersion).getSecondaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=t.tertiaryPalette??ht(this.specVersion).getTertiaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=t.neutralPalette??ht(this.specVersion).getNeutralPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=t.neutralVariantPalette??ht(this.specVersion).getNeutralVariantPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=t.errorPalette??ht(this.specVersion).getErrorPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??p.fromHueAndChroma(25,84),this.colors=new u}toString(){return`Scheme: variant=${s[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(t,e,n){let a=Math.min(e.length-1,n.length),o=t.hue;for(let i=0;i=e[i]&&o=105&&i<125?1.6:2.3));case s.VIBRANT:let m=r.getVibrantNeutralHue(e),d=r.getVibrantNeutralChroma(e,a);return p.fromHueAndChroma(m,d*1.29);default:return super.getNeutralVariantPalette(t,e,n,a,o)}}getErrorPalette(t,e,n,a,o){let i=D.getPiecewiseHue(e,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(t){case s.NEUTRAL:return p.fromHueAndChroma(i,a==="phone"?50:40);case s.TONAL_SPOT:return p.fromHueAndChroma(i,a==="phone"?60:48);case s.EXPRESSIVE:return p.fromHueAndChroma(i,a==="phone"?64:48);case s.VIBRANT:return p.fromHueAndChroma(i,a==="phone"?80:60);default:return super.getErrorPalette(t,e,n,a,o)}}},Ie=new Mt,Me=new te;function ht(r){return r==="2025"?Me:Ie}var mt=class r{static of(t){return new r(t,!1)}static contentOf(t){return new r(t,!0)}static fromColors(t){return r.createPaletteFromColors(!1,t)}static contentFromColors(t){return r.createPaletteFromColors(!0,t)}static createPaletteFromColors(t,e){let n=new r(e.primary,t);if(e.secondary){let a=new r(e.secondary,t);n.a2=a.a1}if(e.tertiary){let a=new r(e.tertiary,t);n.a3=a.a1}if(e.error){let a=new r(e.error,t);n.error=a.a1}if(e.neutral){let a=new r(e.neutral,t);n.n1=a.n1}if(e.neutralVariant){let a=new r(e.neutralVariant,t);n.n2=a.n2}return n}constructor(t,e){let n=x.fromInt(t),a=n.hue,o=n.chroma;e?(this.a1=p.fromHueAndChroma(a,o),this.a2=p.fromHueAndChroma(a,o/3),this.a3=p.fromHueAndChroma(a+60,o/2),this.n1=p.fromHueAndChroma(a,Math.min(o/12,4)),this.n2=p.fromHueAndChroma(a,Math.min(o/6,8))):(this.a1=p.fromHueAndChroma(a,Math.max(48,o)),this.a2=p.fromHueAndChroma(a,16),this.a3=p.fromHueAndChroma(a+60,24),this.n1=p.fromHueAndChroma(a,4),this.n2=p.fromHueAndChroma(a,8)),this.error=p.fromHueAndChroma(25,84)}};var Bt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.CONTENT,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Rt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.EXPRESSIVE,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Lt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.FIDELITY,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Ot=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.FRUIT_SALAD,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Vt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.MONOCHROME,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Nt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.NEUTRAL,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Ht=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.RAINBOW,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Ut=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.TONAL_SPOT,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var _t=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.VIBRANT,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Be={desired:4,fallbackColorARGB:4282549748,filter:!0};function Re(r,t){return r.score>t.score?-1:r.score=15;P--){S.length=0;for(let{hct:f}of g)if(S.find(C=>vt(f.hue,C.hue)=n)break;if(S.length>=n)break}let y=[];S.length===0&&y.push(a);for(let P of S)y.push(P.toInt());return y}};Q.TARGET_CHROMA=48;Q.WEIGHT_PROPORTION=.7;Q.WEIGHT_CHROMA_ABOVE=.3;Q.WEIGHT_CHROMA_BELOW=.1;Q.CUTOFF_CHROMA=5;Q.CUTOFF_EXCITED_PROPORTION=.01;function st(r){let t=gt(r),e=yt(r),n=Pt(r),a=[t.toString(16),e.toString(16),n.toString(16)];for(let[o,i]of a.entries())i.length===1&&(a[o]="0"+i);return"#"+a.join("")}function zt(r){r=r.replace("#","");let t=r.length===3,e=r.length===6,n=r.length===8;if(!t&&!e&&!n)throw new Error("unexpected hex "+r);let a=0,o=0,i=0;return t?(a=tt(r.slice(0,1).repeat(2)),o=tt(r.slice(1,2).repeat(2)),i=tt(r.slice(2,3).repeat(2))):e?(a=tt(r.slice(0,2)),o=tt(r.slice(2,4)),i=tt(r.slice(4,6))):n&&(a=tt(r.slice(2,4)),o=tt(r.slice(4,6)),i=tt(r.slice(6,8))),(255<<24|(a&255)<<16|(o&255)<<8|i&255)>>>0}function tt(r){return parseInt(r,16)}function pe(r,t){let e=t.value,n=e,a=r;t.blend&&(e=Ft.harmonize(n,a));let i=mt.of(e).a1;return{color:t,value:e,light:{color:i.tone(40),onColor:i.tone(100),colorContainer:i.tone(90),onColorContainer:i.tone(10)},dark:{color:i.tone(80),onColor:i.tone(20),colorContainer:i.tone(30),onColorContainer:i.tone(90)}}}var ge={"tonal-spot":Ut,vibrant:_t,expressive:Rt,neutral:Nt,fidelity:Lt,content:Bt,monochrome:Vt,rainbow:Ht,"fruit-salad":Ot},Le=/_palette_key_color$/;function ft(r){process.stderr.write(`${r} -`),process.exit(1)}var $;try{$=JSON.parse(process.argv[2]??"")}catch{ft('Expected one JSON argument: {"seed": "#rrggbb", "variant": "tonal-spot", ...}')}var ye=/^#[0-9a-f]{6}$/i,Pe=ge[$.variant],de=["2021","2025"],ee=$.spec??"2025";ye.test($.seed??"")||ft(`The seed must be a #rrggbb colour, "${$.seed}" given.`);Pe||ft(`Unknown variant "${$.variant}". Use one of: ${Object.keys(ge).join(", ")}.`);de.includes(ee)||ft(`Unknown spec "${ee}". Use one of: ${de.join(", ")}.`);for(let r of["success","warning","info"])ye.test($[r]??"")||ft(`The ${r} colour must be a #rrggbb colour, "${$[r]}" given.`);var Gt=Number($.contrast??0);Gt>=-1&&Gt<=1||ft(`The contrast level must be between -1 and 1, "${$.contrast}" given.`);var Oe=x.fromInt(zt($.seed)),Ve=new u;function Ce(r){let t=new Pe(Oe,r,Gt,ee),e={};for(let n of Ve.allColors)n&&!Le.test(n.name)&&(e[n.name.replaceAll("_","-")]=st(n.getArgb(t)));return{scheme:t,out:e}}var At=Ce(!1),$t=Ce(!0);for(let r of["success","warning","info"]){let t=pe(zt($.seed),{name:r,value:zt($[r]),blend:!1});for(let[e,n]of[["light",At.out],["dark",$t.out]])n[r]=st(t[e].color),n[`on-${r}`]=st(t[e].onColor),n[`${r}-container`]=st(t[e].colorContainer),n[`on-${r}-container`]=st(t[e].onColorContainer)}for(let r of["error","success","warning","info"])At.out[`inverse-${r}`]=$t.out[r],$t.out[`inverse-${r}`]=At.out[r];process.stdout.write(JSON.stringify({seed:$.seed.toLowerCase(),variant:$.variant,spec:At.scheme.specVersion,contrast:Gt,light:At.out,dark:$t.out})); +function z(r){return r<0?-1:r===0?0:1}function at(r,t,e){return(1-e)*r+e*t}function ue(r,t,e){return et?t:e}function M(r,t,e){return et?t:e}function ut(r){return r=r%360,r<0&&(r=r+360),r}function U(r){return r=r%360,r<0&&(r=r+360),r}function le(r,t){return U(t-r)<=180?1:-1}function wt(r,t){return 180-Math.abs(Math.abs(r-t)-180)}function pt(r,t){let e=r[0]*t[0][0]+r[1]*t[0][1]+r[2]*t[0][2],n=r[0]*t[1][0]+r[1]*t[1][1]+r[2]*t[1][2],a=r[0]*t[2][0]+r[1]*t[2][1]+r[2]*t[2][2];return[e,n,a]}var he=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],Be=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],me=[95.047,100,108.883];function vt(r,t,e){return(255<<24|(r&255)<<16|(t&255)<<8|e&255)>>>0}function jt(r){let t=ot(r[0]),e=ot(r[1]),n=ot(r[2]);return vt(t,e,n)}function gt(r){return r>>16&255}function yt(r){return r>>8&255}function Pt(r){return r&255}function fe(r,t,e){let n=Be,a=n[0][0]*r+n[0][1]*t+n[0][2]*e,o=n[1][0]*r+n[1][1]*t+n[1][2]*e,i=n[2][0]*r+n[2][1]*t+n[2][2]*e,c=ot(a),m=ot(o),p=ot(i);return vt(c,m,p)}function Re(r){let t=J(gt(r)),e=J(yt(r)),n=J(Pt(r));return pt([t,e,n],he)}function Wt(r){let t=J(gt(r)),e=J(yt(r)),n=J(Pt(r)),a=he,o=a[0][0]*t+a[0][1]*e+a[0][2]*n,i=a[1][0]*t+a[1][1]*e+a[1][2]*n,c=a[2][0]*t+a[2][1]*e+a[2][2]*n,m=me,p=o/m[0],d=i/m[1],S=c/m[2],g=dt(p),y=dt(d),f=dt(S),h=116*y-16,C=500*(g-y),v=200*(y-f);return[h,C,v]}function pe(r){let t=q(r),e=ot(t);return vt(e,e,e)}function Ct(r){let t=Re(r)[1];return 116*dt(t/100)-16}function q(r){return 100*Oe((r+16)/116)}function St(r){return dt(r/100)*116-16}function J(r){let t=r/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function ot(r){let t=r/100,e=0;return t<=.0031308?e=t*12.92:e=1.055*Math.pow(t,1/2.4)-.055,ue(0,255,Math.round(e*255))}function de(){return me}function dt(r){let t=.008856451679035631,e=24389/27;return r>t?Math.pow(r,1/3):(e*r+16)/116}function Oe(r){let t=.008856451679035631,e=24389/27,n=r*r*r;return n>t?n:(116*r-16)/e}var Y=class r{static make(t=de(),e=200/Math.PI*q(50)/100,n=50,a=2,o=!1){let i=t,c=i[0]*.401288+i[1]*.650173+i[2]*-.051461,m=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,p=i[0]*-.002079+i[1]*.048952+i[2]*.953127,d=.8+a/10,S=d>=.9?at(.59,.69,(d-.9)*10):at(.525,.59,(d-.8)*10),g=o?1:d*(1-1/3.6*Math.exp((-e-42)/92));g=g>1?1:g<0?0:g;let y=d,f=[g*(100/c)+1-g,g*(100/m)+1-g,g*(100/p)+1-g],h=1/(5*e+1),C=h*h*h*h,v=1-C,F=C*e+.1*v*v*Math.cbrt(5*e),I=q(n)/t[1],R=1.48+Math.sqrt(I),V=.725/Math.pow(I,.2),O=V,E=[Math.pow(F*f[0]*c/100,.42),Math.pow(F*f[1]*m/100,.42),Math.pow(F*f[2]*p/100,.42)],H=[400*E[0]/(E[0]+27.13),400*E[1]/(E[1]+27.13),400*E[2]/(E[2]+27.13)],_=(2*H[0]+H[1]+.05*H[2])*V;return new r(I,_,V,O,S,y,f,F,Math.pow(F,.25),R)}constructor(t,e,n,a,o,i,c,m,p,d){this.n=t,this.aw=e,this.nbb=n,this.ncb=a,this.c=o,this.nc=i,this.rgbD=c,this.fl=m,this.fLRoot=p,this.z=d}};Y.DEFAULT=Y.make();var G=class r{constructor(t,e,n,a,o,i,c,m,p){this.hue=t,this.chroma=e,this.j=n,this.q=a,this.m=o,this.s=i,this.jstar=c,this.astar=m,this.bstar=p}distance(t){let e=this.jstar-t.jstar,n=this.astar-t.astar,a=this.bstar-t.bstar,o=Math.sqrt(e*e+n*n+a*a);return 1.41*Math.pow(o,.63)}static fromInt(t){return r.fromIntInViewingConditions(t,Y.DEFAULT)}static fromIntInViewingConditions(t,e){let n=(t&16711680)>>16,a=(t&65280)>>8,o=t&255,i=J(n),c=J(a),m=J(o),p=.41233895*i+.35762064*c+.18051042*m,d=.2126*i+.7152*c+.0722*m,S=.01932141*i+.11916382*c+.95034478*m,g=.401288*p+.650173*d-.051461*S,y=-.250268*p+1.204414*d+.045854*S,f=-.002079*p+.048952*d+.953127*S,h=e.rgbD[0]*g,C=e.rgbD[1]*y,v=e.rgbD[2]*f,F=Math.pow(e.fl*Math.abs(h)/100,.42),I=Math.pow(e.fl*Math.abs(C)/100,.42),R=Math.pow(e.fl*Math.abs(v)/100,.42),V=z(h)*400*F/(F+27.13),O=z(C)*400*I/(I+27.13),E=z(v)*400*R/(R+27.13),H=(11*V+-12*O+E)/11,_=(V+O-2*E)/9,L=(20*V+20*O+21*E)/20,Z=(40*V+20*O+E)/20,ct=Math.atan2(_,H)*180/Math.PI,X=U(ct),kt=X*Math.PI/180,Tt=Z*e.nbb,rt=100*Math.pow(Tt/e.aw,e.c*e.z),Dt=4/e.c*Math.sqrt(rt/100)*(e.aw+4)*e.fLRoot,Yt=X<20.14?X+360:X,Kt=.25*(Math.cos(Yt*Math.PI/180+2)+3.8),qt=5e4/13*Kt*e.nc*e.ncb*Math.sqrt(H*H+_*_)/(L+.305),bt=Math.pow(qt,.9)*Math.pow(1.64-Math.pow(.29,e.n),.73),ie=bt*Math.sqrt(rt/100),se=ie*e.fLRoot,Fe=50*Math.sqrt(bt*e.c/(e.aw+4)),Ee=(1+100*.007)*rt/(1+.007*rt),ce=1/.0228*Math.log(1+.0228*se),Ie=ce*Math.cos(kt),Me=ce*Math.sin(kt);return new r(X,ie,rt,Dt,se,Fe,Ee,Ie,Me)}static fromJch(t,e,n){return r.fromJchInViewingConditions(t,e,n,Y.DEFAULT)}static fromJchInViewingConditions(t,e,n,a){let o=4/a.c*Math.sqrt(t/100)*(a.aw+4)*a.fLRoot,i=e*a.fLRoot,c=e/Math.sqrt(t/100),m=50*Math.sqrt(c*a.c/(a.aw+4)),p=n*Math.PI/180,d=(1+100*.007)*t/(1+.007*t),S=1/.0228*Math.log(1+.0228*i),g=S*Math.cos(p),y=S*Math.sin(p);return new r(n,e,t,o,i,m,d,g,y)}static fromUcs(t,e,n){return r.fromUcsInViewingConditions(t,e,n,Y.DEFAULT)}static fromUcsInViewingConditions(t,e,n,a){let o=e,i=n,c=Math.sqrt(o*o+i*i),p=(Math.exp(c*.0228)-1)/.0228/a.fLRoot,d=Math.atan2(i,o)*(180/Math.PI);d<0&&(d+=360);let S=t/(1-(t-100)*.007);return r.fromJchInViewingConditions(S,p,d,a)}toInt(){return this.viewed(Y.DEFAULT)}viewed(t){let e=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(e/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),a=this.hue*Math.PI/180,o=.25*(Math.cos(a+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),c=o*(5e4/13)*t.nc*t.ncb,m=i/t.nbb,p=Math.sin(a),d=Math.cos(a),S=23*(m+.305)*n/(23*c+11*n*d+108*n*p),g=S*d,y=S*p,f=(460*m+451*g+288*y)/1403,h=(460*m-891*g-261*y)/1403,C=(460*m-220*g-6300*y)/1403,v=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),F=z(f)*(100/t.fl)*Math.pow(v,1/.42),I=Math.max(0,27.13*Math.abs(h)/(400-Math.abs(h))),R=z(h)*(100/t.fl)*Math.pow(I,1/.42),V=Math.max(0,27.13*Math.abs(C)/(400-Math.abs(C))),O=z(C)*(100/t.fl)*Math.pow(V,1/.42),E=F/t.rgbD[0],H=R/t.rgbD[1],_=O/t.rgbD[2],L=1.86206786*E-1.01125463*H+.14918677*_,Z=.38752654*E+.62144744*H-.00897398*_,et=-.0158415*E-.03412294*H+1.04996444*_;return fe(L,Z,et)}static fromXyzInViewingConditions(t,e,n,a){let o=.401288*t+.650173*e-.051461*n,i=-.250268*t+1.204414*e+.045854*n,c=-.002079*t+.048952*e+.953127*n,m=a.rgbD[0]*o,p=a.rgbD[1]*i,d=a.rgbD[2]*c,S=Math.pow(a.fl*Math.abs(m)/100,.42),g=Math.pow(a.fl*Math.abs(p)/100,.42),y=Math.pow(a.fl*Math.abs(d)/100,.42),f=z(m)*400*S/(S+27.13),h=z(p)*400*g/(g+27.13),C=z(d)*400*y/(y+27.13),v=(11*f+-12*h+C)/11,F=(f+h-2*C)/9,I=(20*f+20*h+21*C)/20,R=(40*f+20*h+C)/20,O=Math.atan2(F,v)*180/Math.PI,E=O<0?O+360:O>=360?O-360:O,H=E*Math.PI/180,_=R*a.nbb,L=100*Math.pow(_/a.aw,a.c*a.z),Z=4/a.c*Math.sqrt(L/100)*(a.aw+4)*a.fLRoot,et=E<20.14?E+360:E,ct=1/4*(Math.cos(et*Math.PI/180+2)+3.8),kt=5e4/13*ct*a.nc*a.ncb*Math.sqrt(v*v+F*F)/(I+.305),Tt=Math.pow(kt,.9)*Math.pow(1.64-Math.pow(.29,a.n),.73),rt=Tt*Math.sqrt(L/100),Dt=rt*a.fLRoot,Yt=50*Math.sqrt(Tt*a.c/(a.aw+4)),Kt=(1+100*.007)*L/(1+.007*L),Xt=Math.log(1+.0228*Dt)/.0228,qt=Xt*Math.cos(H),bt=Xt*Math.sin(H);return new r(E,rt,L,Z,Dt,Yt,Kt,qt,bt)}xyzInViewingConditions(t){let e=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(e/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),a=this.hue*Math.PI/180,o=.25*(Math.cos(a+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),c=o*(5e4/13)*t.nc*t.ncb,m=i/t.nbb,p=Math.sin(a),d=Math.cos(a),S=23*(m+.305)*n/(23*c+11*n*d+108*n*p),g=S*d,y=S*p,f=(460*m+451*g+288*y)/1403,h=(460*m-891*g-261*y)/1403,C=(460*m-220*g-6300*y)/1403,v=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),F=z(f)*(100/t.fl)*Math.pow(v,1/.42),I=Math.max(0,27.13*Math.abs(h)/(400-Math.abs(h))),R=z(h)*(100/t.fl)*Math.pow(I,1/.42),V=Math.max(0,27.13*Math.abs(C)/(400-Math.abs(C))),O=z(C)*(100/t.fl)*Math.pow(V,1/.42),E=F/t.rgbD[0],H=R/t.rgbD[1],_=O/t.rgbD[2],L=1.86206786*E-1.01125463*H+.14918677*_,Z=.38752654*E+.62144744*H-.00897398*_,et=-.0158415*E-.03412294*H+1.04996444*_;return[L,Z,et]}};var W=class r{static sanitizeRadians(t){return(t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let e=t/100,n=0;return e<=.0031308?n=e*12.92:n=1.055*Math.pow(e,1/2.4)-.055,n*255}static chromaticAdaptation(t){let e=Math.pow(Math.abs(t),.42);return z(t)*400*e/(e+27.13)}static hueOf(t){let e=pt(t,r.SCALED_DISCOUNT_FROM_LINRGB),n=r.chromaticAdaptation(e[0]),a=r.chromaticAdaptation(e[1]),o=r.chromaticAdaptation(e[2]),i=(11*n+-12*a+o)/11,c=(n+a-2*o)/9;return Math.atan2(c,i)}static areInCyclicOrder(t,e,n){let a=r.sanitizeRadians(e-t),o=r.sanitizeRadians(n-t);return a100.01||L[1]>100.01||L[2]>100.01?0:jt(L);a=a-(X-n)*a/(2*X)}return 0}static solveToInt(t,e,n){if(e<1e-4||n<1e-4||n>99.9999)return pe(n);t=U(t);let a=t/180*Math.PI,o=q(n),i=r.findResultByJ(a,e,o);if(i!==0)return i;let c=r.bisectToLimit(o,a);return jt(c)}static solveToCam(t,e,n){return G.fromInt(r.solveToInt(t,e,n))}};W.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];W.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];W.Y_FROM_LINRGB=[.2126,.7152,.0722];W.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var A=class r{static from(t,e,n){return new r(W.solveToInt(t,e,n))}static fromInt(t){return new r(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(W.solveToInt(t,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(W.solveToInt(this.internalHue,t,this.internalTone))}get tone(){return this.internalTone}set tone(t){this.setInternalState(W.solveToInt(this.internalHue,this.internalChroma,t))}setValue(t,e){this[t]=e}toString(){return`HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(t){return t>=250&&t<270}static isYellow(t){return t>=105&&t<125}static isCyan(t){return t>=170&&t<207}constructor(t){this.argb=t;let e=G.fromInt(t);this.internalHue=e.hue,this.internalChroma=e.chroma,this.internalTone=Ct(t),this.argb=t}setInternalState(t){let e=G.fromInt(t);this.internalHue=e.hue,this.internalChroma=e.chroma,this.internalTone=Ct(t),this.argb=t}inViewingConditions(t){let n=G.fromInt(this.toInt()).xyzInViewingConditions(t),a=G.fromXyzInViewingConditions(n[0],n[1],n[2],Y.make());return r.from(a.hue,a.chroma,St(n[1]))}};var xt=class r{static harmonize(t,e){let n=A.fromInt(t),a=A.fromInt(e),o=wt(n.hue,a.hue),i=Math.min(o*.5,15),c=U(n.hue+i*le(n.hue,a.hue));return A.from(c,n.chroma,n.tone).toInt()}static hctHue(t,e,n){let a=r.cam16Ucs(t,e,n),o=G.fromInt(a),i=G.fromInt(t);return A.from(o.hue,i.chroma,Ct(t)).toInt()}static cam16Ucs(t,e,n){let a=G.fromInt(t),o=G.fromInt(e),i=a.jstar,c=a.astar,m=a.bstar,p=o.jstar,d=o.astar,S=o.bstar,g=i+(p-i)*n,y=c+(d-c)*n,f=m+(S-m)*n;return G.fromUcs(g,y,f).toInt()}};var N=class r{static ratioOfTones(t,e){return t=M(0,100,t),e=M(0,100,e),r.ratioOfYs(q(t),q(e))}static ratioOfYs(t,e){let n=t>e?t:e,a=n===e?t:e;return(n+5)/(a+5)}static lighter(t,e){if(t<0||t>100)return-1;let n=q(t),a=e*(n+5)-5,o=r.ratioOfYs(a,n),i=Math.abs(o-e);if(o.04)return-1;let c=St(a)+.4;return c<0||c>100?-1:c}static darker(t,e){if(t<0||t>100)return-1;let n=q(t),a=(n+5)/e-5,o=r.ratioOfYs(n,a),i=Math.abs(o-e);if(o.04)return-1;let c=St(a)-.4;return c<0||c>100?-1:c}static lighterUnsafe(t,e){let n=r.lighter(t,e);return n<0?100:n}static darkerUnsafe(t,e){let n=r.darker(t,e);return n<0?0:n}};var it=class r{static isDisliked(t){let e=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,n=Math.round(t.chroma)>16,a=Math.round(t.tone)<65;return e&&n&&a}static fixIfDisliked(t){return r.isDisliked(t)?A.from(t.hue,t.chroma,70):t}};function Le(r,t,e){if(r.name!==e.name)throw new Error(`Attempting to extend color ${r.name} with color ${e.name} of different name for spec version ${t}.`);if(r.isBackground!==e.isBackground)throw new Error(`Attempting to extend color ${r.name} as a ${r.isBackground?"background":"foreground"} with color ${e.name} as a ${e.isBackground?"background":"foreground"} for spec version ${t}.`)}function k(r,t,e){return Le(r,t,e),u.fromPalette({name:r.name,palette:n=>n.specVersion===t?e.palette(n):r.palette(n),tone:n=>n.specVersion===t?e.tone(n):r.tone(n),isBackground:r.isBackground,chromaMultiplier:n=>{let a=n.specVersion===t?e.chromaMultiplier:r.chromaMultiplier;return a!==void 0?a(n):1},background:n=>{let a=n.specVersion===t?e.background:r.background;return a!==void 0?a(n):void 0},secondBackground:n=>{let a=n.specVersion===t?e.secondBackground:r.secondBackground;return a!==void 0?a(n):void 0},contrastCurve:n=>{let a=n.specVersion===t?e.contrastCurve:r.contrastCurve;return a!==void 0?a(n):void 0},toneDeltaPair:n=>{let a=n.specVersion===t?e.toneDeltaPair:r.toneDeltaPair;return a!==void 0?a(n):void 0}})}var u=class r{static fromPalette(t){return new r(t.name??"",t.palette,t.tone??r.getInitialToneFromBackground(t.background),t.isBackground??!1,t.chromaMultiplier,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}static getInitialToneFromBackground(t){return t===void 0?e=>50:e=>t(e)?t(e).getTone(e):50}constructor(t,e,n,a,o,i,c,m,p){if(this.name=t,this.palette=e,this.tone=n,this.isBackground=a,this.chromaMultiplier=o,this.background=i,this.secondBackground=c,this.contrastCurve=m,this.toneDeltaPair=p,this.hctCache=new Map,!i&&c)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!i&&m)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(i&&!m)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return r.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear()}getArgb(t){return this.getHct(t).toInt()}getHct(t){let e=this.hctCache.get(t);if(e!=null)return e;let n=ge(t.specVersion).getHct(t,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,n),n}getTone(t){return ge(t.specVersion).getTone(t,this)}static foregroundTone(t,e){let n=N.lighterUnsafe(t,e),a=N.darkerUnsafe(t,e),o=N.ratioOfTones(n,t),i=N.ratioOfTones(a,t);if(r.tonePrefersLightForeground(t)){let m=Math.abs(o-i)<.1&&o=e||o>=i||m?n:a}else return i>=e||i>=o?a:n}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return r.tonePrefersLightForeground(t)&&!r.toneAllowsLightForeground(t)?49:t}},Jt=class{getHct(t,e){let n=e.getTone(t);return e.palette(t).getHct(n)}getTone(t,e){let n=t.contrastLevel<0,a=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(a){let o=a.roleA,i=a.roleB,c=a.delta,m=a.polarity,p=a.stayTogether,d=m==="nearer"||m==="lighter"&&!t.isDark||m==="darker"&&t.isDark,S=d?o:i,g=d?i:o,y=e.name===S.name,f=t.isDark?1:-1,h=S.tone(t),C=g.tone(t);if(e.background&&S.contrastCurve&&g.contrastCurve){let v=e.background(t),F=S.contrastCurve(t),I=g.contrastCurve(t);if(v&&F&&I){let R=v.getTone(t),V=F.get(t.contrastLevel),O=I.get(t.contrastLevel);N.ratioOfTones(R,h)=c||(h=M(0,100,C-c*f))),50<=h&&h<60?f>0?(h=60,C=Math.max(C,h+c*f)):(h=49,C=Math.min(C,h+c*f)):50<=C&&C<60&&(p?f>0?(h=60,C=Math.max(C,h+c*f)):(h=49,C=Math.min(C,h+c*f)):f>0?C=60:C=49),y?h:C}else{let o=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return o;let i=e.background(t).getTone(t),c=e.contrastCurve(t).get(t.contrastLevel);if(N.ratioOfTones(i,o)>=c||(o=u.foregroundTone(i,c)),n&&(o=u.foregroundTone(i,c)),e.isBackground&&50<=o&&o<60&&(N.ratioOfTones(49,i)>=c?o=49:o=60),e.secondBackground==null||e.secondBackground(t)===void 0)return o;let[m,p]=[e.background,e.secondBackground],[d,S]=[m(t).getTone(t),p(t).getTone(t)],[g,y]=[Math.max(d,S),Math.min(d,S)];if(N.ratioOfTones(g,o)>=c&&N.ratioOfTones(y,o)>=c)return o;let f=N.lighter(g,c),h=N.darker(y,c),C=[];return f!==-1&&C.push(f),h!==-1&&C.push(h),u.tonePrefersLightForeground(d)||u.tonePrefersLightForeground(S)?f<0?100:f:C.length===1?C[0]:h<0?0:h}}},Zt=class{getHct(t,e){let n=e.palette(t),a=e.getTone(t),o=n.hue,i=n.chroma*(e.chromaMultiplier?e.chromaMultiplier(t):1);return A.from(o,i,a)}getTone(t,e){let n=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(n){let a=n.roleA,o=n.roleB,i=n.polarity,c=n.constraint,m=i==="darker"||i==="relative_lighter"&&t.isDark||i==="relative_darker"&&!t.isDark?-n.delta:n.delta,p=e.name===a.name,d=p?a:o,S=p?o:a,g=d.tone(t),y=S.getTone(t),f=m*(p?1:-1);if(c==="exact"?g=M(0,100,y+f):c==="nearer"?f>0?g=M(0,100,M(y,y+f,g)):g=M(0,100,M(y+f,y,g)):c==="farther"&&(f>0?g=M(y+f,100,g):g=M(0,y+f,g)),e.background&&e.contrastCurve){let h=e.background(t),C=e.contrastCurve(t);if(h&&C){let v=h.getTone(t),F=C.get(t.contrastLevel);g=N.ratioOfTones(v,g)>=F&&t.contrastLevel>=0?g:u.foregroundTone(v,F)}}return e.isBackground&&!e.name.endsWith("_fixed_dim")&&(g>=57?g=M(65,100,g):g=M(0,49,g)),g}else{let a=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return a;let o=e.background(t).getTone(t),i=e.contrastCurve(t).get(t.contrastLevel);if(a=N.ratioOfTones(o,a)>=i&&t.contrastLevel>=0?a:u.foregroundTone(o,i),e.isBackground&&!e.name.endsWith("_fixed_dim")&&(a>=57?a=M(65,100,a):a=M(0,49,a)),e.secondBackground==null||e.secondBackground(t)===void 0)return a;let[c,m]=[e.background,e.secondBackground],[p,d]=[c(t).getTone(t),m(t).getTone(t)],[S,g]=[Math.max(p,d),Math.min(p,d)];if(N.ratioOfTones(S,a)>=i&&N.ratioOfTones(g,a)>=i)return a;let y=N.lighter(S,i),f=N.darker(g,i),h=[];return y!==-1&&h.push(y),f!==-1&&h.push(f),u.tonePrefersLightForeground(p)||u.tonePrefersLightForeground(d)?y<0?100:y:h.length===1?h[0]:f<0?0:f}}},Ve=new Jt,Ne=new Zt;function ge(r){return r==="2025"?Ne:Ve}var P=class r{static fromInt(t){let e=A.fromInt(t);return r.fromHct(e)}static fromHct(t){return new r(t.hue,t.chroma,t)}static fromHueAndChroma(t,e){let n=new Qt(t,e).create();return new r(t,e,n)}constructor(t,e,n){this.hue=t,this.chroma=e,this.keyColor=n,this.cache=new Map}tone(t){let e=this.cache.get(t);return e===void 0&&(t==99&&A.isYellow(this.hue)?e=this.averageArgb(this.tone(98),this.tone(100)):e=A.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,e)),e}getHct(t){return A.fromInt(this.tone(t))}averageArgb(t,e){let n=t>>>16&255,a=t>>>8&255,o=t&255,i=e>>>16&255,c=e>>>8&255,m=e&255,p=Math.round((n+i)/2),d=Math.round((a+c)/2),S=Math.round((o+m)/2);return(255<<24|(p&255)<<16|(d&255)<<8|S&255)>>>0}},Qt=class{constructor(t,e){this.hue=t,this.requestedChroma=e,this.chromaCache=new Map,this.maxChromaValue=200}create(){let a=0,o=100;for(;a=this.requestedChroma-.01)if(Math.abs(a-50)0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),e=this.tempsByHct;return t.sort((n,a)=>e.get(n)-e.get(a)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,e=12){let n=Math.round(this.input.hue),a=this.hctsByHue[n],o=this.relativeTemperature(a),i=[a],c=0;for(let f=0;f<360;f++){let h=ut(n+f),C=this.hctsByHue[h],v=this.relativeTemperature(C),F=Math.abs(v-o);o=v,c+=F}let m=1,p=c/e,d=0;for(o=this.relativeTemperature(a);i.length=F,R=1;for(;I&&i.length=V,R++}if(o=C,m++,m>360){for(;i.length=i.length&&(h=h%i.length),S.splice(0,0,i[h])}let y=t-g-1;for(let f=1;f=i.length&&(h=h%i.length),S.push(i[h])}return S}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,e=this.tempsByHct.get(this.coldest),n=this.warmest.hue,o=this.tempsByHct.get(this.warmest)-e,i=r.isBetween(this.input.hue,t,n),c=i?n:t,m=i?t:n,p=1,d=1e3,S=this.hctsByHue[Math.round(this.input.hue)],g=1-this.inputRelativeTemperature;for(let y=0;y<=360;y+=1){let f=U(c+p*y);if(!r.isBetween(f,c,m))continue;let h=this.hctsByHue[Math.round(f)],C=(this.tempsByHct.get(h)-e)/o,v=Math.abs(g-C);v=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),e=new Map;for(let n of t)e.set(n,r.rawTemperature(n));return this.tempsByHctCache=e,e}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let e=0;e<=360;e+=1){let n=A.from(e,this.input.chroma,this.input.tone);t.push(n)}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,e,n){return ec.chroma||Math.abs(c.chroma-t)<.4)break;let m=Math.abs(c.chroma-t),p=Math.abs(o.chroma-t);mt.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return u.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return u.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return u.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return u.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return u.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return u.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:!0})}onBackground(){return u.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new x(3,3,4.5,7)})}surface(){return u.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:!0})}surfaceDim(){return u.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new x(87,87,80,75).get(t.contrastLevel),isBackground:!0})}surfaceBright(){return u.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new x(24,24,29,34).get(t.contrastLevel):98,isBackground:!0})}surfaceContainerLowest(){return u.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new x(4,4,2,0).get(t.contrastLevel):100,isBackground:!0})}surfaceContainerLow(){return u.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new x(10,10,11,12).get(t.contrastLevel):new x(96,96,96,95).get(t.contrastLevel),isBackground:!0})}surfaceContainer(){return u.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new x(12,12,16,20).get(t.contrastLevel):new x(94,94,92,90).get(t.contrastLevel),isBackground:!0})}surfaceContainerHigh(){return u.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new x(17,17,21,25).get(t.contrastLevel):new x(92,92,88,85).get(t.contrastLevel),isBackground:!0})}surfaceContainerHighest(){return u.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new x(22,22,26,30).get(t.contrastLevel):new x(90,90,84,80).get(t.contrastLevel),isBackground:!0})}onSurface(){return u.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new x(4.5,7,11,21)})}surfaceVariant(){return u.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:!0})}onSurfaceVariant(){return u.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new x(3,4.5,7,11)})}inverseSurface(){return u.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:!0})}inverseOnSurface(){return u.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new x(4.5,7,11,21)})}outline(){return u.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1.5,3,4.5,7)})}outlineVariant(){return u.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5)})}shadow(){return u.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return u.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return u.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:!0})}primary(){return u.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>B(t)?t.isDark?100:0:t.isDark?80:40,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(3,4.5,7,7),toneDeltaPair:t=>new b(this.primaryContainer(),this.primary(),10,"nearer",!1)})}primaryDim(){}onPrimary(){return u.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>B(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new x(4.5,7,11,21)})}primaryContainer(){return u.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>lt(t)?t.sourceColorHct.tone:B(t)?t.isDark?85:25:t.isDark?30:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.primaryContainer(),this.primary(),10,"nearer",!1)})}onPrimaryContainer(){return u.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>lt(t)?u.foregroundTone(this.primaryContainer().tone(t),4.5):B(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new x(3,4.5,7,11)})}inversePrimary(){return u.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new x(3,4.5,7,7)})}secondary(){return u.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(3,4.5,7,7),toneDeltaPair:t=>new b(this.secondaryContainer(),this.secondary(),10,"nearer",!1)})}secondaryDim(){}onSecondary(){return u.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>B(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new x(4.5,7,11,21)})}secondaryContainer(){return u.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let e=t.isDark?30:90;return B(t)?t.isDark?30:85:lt(t)?He(t.secondaryPalette.hue,t.secondaryPalette.chroma,e,!t.isDark):e},isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.secondaryContainer(),this.secondary(),10,"nearer",!1)})}onSecondaryContainer(){return u.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>B(t)?t.isDark?90:10:lt(t)?u.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new x(3,4.5,7,11)})}tertiary(){return u.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>B(t)?t.isDark?90:25:t.isDark?80:40,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(3,4.5,7,7),toneDeltaPair:t=>new b(this.tertiaryContainer(),this.tertiary(),10,"nearer",!1)})}tertiaryDim(){}onTertiary(){return u.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>B(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new x(4.5,7,11,21)})}tertiaryContainer(){return u.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(B(t))return t.isDark?60:49;if(!lt(t))return t.isDark?30:90;let e=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return it.fixIfDisliked(e).tone},isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.tertiaryContainer(),this.tertiary(),10,"nearer",!1)})}onTertiaryContainer(){return u.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>B(t)?t.isDark?0:100:lt(t)?u.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new x(3,4.5,7,11)})}error(){return u.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(3,4.5,7,7),toneDeltaPair:t=>new b(this.errorContainer(),this.error(),10,"nearer",!1)})}errorDim(){}onError(){return u.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new x(4.5,7,11,21)})}errorContainer(){return u.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.errorContainer(),this.error(),10,"nearer",!1)})}onErrorContainer(){return u.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>B(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new x(3,4.5,7,11)})}primaryFixed(){return u.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>B(t)?40:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",!0)})}primaryFixedDim(){return u.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>B(t)?30:80,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",!0)})}onPrimaryFixed(){return u.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>B(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new x(4.5,7,11,21)})}onPrimaryFixedVariant(){return u.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>B(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new x(3,4.5,7,11)})}secondaryFixed(){return u.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>B(t)?80:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",!0)})}secondaryFixedDim(){return u.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>B(t)?70:80,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",!0)})}onSecondaryFixed(){return u.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new x(4.5,7,11,21)})}onSecondaryFixedVariant(){return u.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>B(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new x(3,4.5,7,11)})}tertiaryFixed(){return u.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>B(t)?40:90,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",!0)})}tertiaryFixedDim(){return u.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>B(t)?30:80,isBackground:!0,background:t=>this.highestSurface(t),contrastCurve:t=>new x(1,1,3,4.5),toneDeltaPair:t=>new b(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",!0)})}onTertiaryFixed(){return u.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>B(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new x(4.5,7,11,21)})}onTertiaryFixedVariant(){return u.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>B(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new x(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function w(r,t=0,e=100,n=1){let a=ye(r.hue,r.chroma*n,100,!0);return M(t,e,a)}function nt(r,t=0,e=100){let n=ye(r.hue,r.chroma,0,!1);return M(t,e,n)}function ye(r,t,e,n){let a=e,o=A.from(r,t,a);for(;o.chroma100);){e+=n?-1:1;let i=A.from(r,t,e);o.chromae.neutralPalette,tone:e=>(super.surface().tone(e),e.platform==="phone"?e.isDark?4:A.isYellow(e.neutralPalette.hue)?99:e.variant===s.VIBRANT?97:98:0),isBackground:!0});return k(super.surface(),"2025",t)}surfaceDim(){let t=u.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:A.isYellow(e.neutralPalette.hue)?90:e.variant===s.VIBRANT?85:87,isBackground:!0,chromaMultiplier:e=>{if(!e.isDark){if(e.variant===s.NEUTRAL)return 2.5;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===s.VIBRANT)return 1.36}return 1}});return k(super.surfaceDim(),"2025",t)}surfaceBright(){let t=u.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?18:A.isYellow(e.neutralPalette.hue)?99:e.variant===s.VIBRANT?97:98,isBackground:!0,chromaMultiplier:e=>{if(e.isDark){if(e.variant===s.NEUTRAL)return 2.5;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===s.VIBRANT)return 1.36}return 1}});return k(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=u.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?0:100,isBackground:!0});return k(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=u.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?6:A.isYellow(e.neutralPalette.hue)?98:e.variant===s.VIBRANT?95:96:15,isBackground:!0,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.3;if(e.variant===s.TONAL_SPOT)return 1.25;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?1.3:1.15;if(e.variant===s.VIBRANT)return 1.08}return 1}});return k(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=u.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?9:A.isYellow(e.neutralPalette.hue)?96:e.variant===s.VIBRANT?92:94:20,isBackground:!0,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.6;if(e.variant===s.TONAL_SPOT)return 1.4;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?1.6:1.3;if(e.variant===s.VIBRANT)return 1.15}return 1}});return k(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=u.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?12:A.isYellow(e.neutralPalette.hue)?94:e.variant===s.VIBRANT?90:92:25,isBackground:!0,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.9;if(e.variant===s.TONAL_SPOT)return 1.5;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?1.95:1.45;if(e.variant===s.VIBRANT)return 1.22}return 1}});return k(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=u.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?15:A.isYellow(e.neutralPalette.hue)?92:e.variant===s.VIBRANT?88:90,isBackground:!0,chromaMultiplier:e=>e.variant===s.NEUTRAL?2.2:e.variant===s.TONAL_SPOT?1.7:e.variant===s.EXPRESSIVE?A.isYellow(e.neutralPalette.hue)?2.3:1.6:e.variant===s.VIBRANT?1.29:1});return k(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=u.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.variant===s.VIBRANT?w(e.neutralPalette,0,100,1.1):u.getInitialToneFromBackground(n=>n.platform==="phone"?this.highestSurface(n):this.surfaceContainerHigh())(e),chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.isDark&&e.platform==="phone"?T(11):T(9)});return k(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=u.fromPalette({name:"on_surface_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?e.isDark?T(6):T(4.5):T(7)});return k(super.onSurfaceVariant(),"2025",t)}outline(){let t=u.fromPalette({name:"outline",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(3):T(4.5)});return k(super.outline(),"2025",t)}outlineVariant(){let t=u.fromPalette({name:"outline_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return A.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(1.5):T(3)});return k(super.outlineVariant(),"2025",t)}inverseSurface(){let t=u.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?98:4,isBackground:!0});return k(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=u.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,background:e=>this.inverseSurface(),contrastCurve:e=>T(7)});return k(super.inverseOnSurface(),"2025",t)}primary(){let t=u.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>e.variant===s.NEUTRAL?e.platform==="phone"?e.isDark?80:40:90:e.variant===s.TONAL_SPOT?e.platform==="phone"?e.isDark?80:w(e.primaryPalette):w(e.primaryPalette,0,90):e.variant===s.EXPRESSIVE?e.platform==="phone"?w(e.primaryPalette,0,A.isYellow(e.primaryPalette.hue)?25:A.isCyan(e.primaryPalette.hue)?88:98):w(e.primaryPalette):e.platform==="phone"?w(e.primaryPalette,0,A.isCyan(e.primaryPalette.hue)?88:98):w(e.primaryPalette),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7),toneDeltaPair:e=>e.platform==="phone"?new b(this.primaryContainer(),this.primary(),5,"relative_lighter",!0,"farther"):void 0});return k(super.primary(),"2025",t)}primaryDim(){return u.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===s.NEUTRAL?85:t.variant===s.TONAL_SPOT?w(t.primaryPalette,0,90):w(t.primaryPalette),isBackground:!0,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>T(4.5),toneDeltaPair:t=>new b(this.primaryDim(),this.primary(),5,"darker",!0,"farther")})}onPrimary(){let t=u.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,background:e=>e.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onPrimary(),"2025",t)}primaryContainer(){let t=u.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>e.platform==="watch"?30:e.variant===s.NEUTRAL?e.isDark?30:90:e.variant===s.TONAL_SPOT?e.isDark?nt(e.primaryPalette,35,93):w(e.primaryPalette,0,90):e.variant===s.EXPRESSIVE?e.isDark?w(e.primaryPalette,30,93):w(e.primaryPalette,78,A.isCyan(e.primaryPalette.hue)?88:90):e.isDark?nt(e.primaryPalette,66,93):w(e.primaryPalette,66,A.isCyan(e.primaryPalette.hue)?88:93),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="phone"?void 0:new b(this.primaryContainer(),this.primaryDim(),10,"darker",!0,"farther"),contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=u.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,background:e=>this.primaryContainer(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=u.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.primaryContainer().getTone(n)},isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=u.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>this.primaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new b(this.primaryFixedDim(),this.primaryFixed(),5,"darker",!0,"exact")});return k(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=u.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>T(7)});return k(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=u.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>T(4.5)});return k(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=u.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>w(e.primaryPalette),background:e=>this.inverseSurface(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.inversePrimary(),"2025",t)}secondary(){let t=u.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?e.variant===s.NEUTRAL?90:w(e.secondaryPalette,0,90):e.variant===s.NEUTRAL?e.isDark?nt(e.secondaryPalette,0,98):w(e.secondaryPalette):e.variant===s.VIBRANT?w(e.secondaryPalette,0,e.isDark?90:98):e.isDark?80:w(e.secondaryPalette),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7),toneDeltaPair:e=>e.platform==="phone"?new b(this.secondaryContainer(),this.secondary(),5,"relative_lighter",!0,"farther"):void 0});return k(super.secondary(),"2025",t)}secondaryDim(){return u.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===s.NEUTRAL?85:w(t.secondaryPalette,0,90),isBackground:!0,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>T(4.5),toneDeltaPair:t=>new b(this.secondaryDim(),this.secondary(),5,"darker",!0,"farther")})}onSecondary(){let t=u.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,background:e=>e.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onSecondary(),"2025",t)}secondaryContainer(){let t=u.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?30:e.variant===s.VIBRANT?e.isDark?nt(e.secondaryPalette,30,40):w(e.secondaryPalette,84,90):e.variant===s.EXPRESSIVE?e.isDark?15:w(e.secondaryPalette,90,95):e.isDark?25:90,isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new b(this.secondaryContainer(),this.secondaryDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=u.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,background:e=>this.secondaryContainer(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=u.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.secondaryContainer().getTone(n)},isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=u.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>this.secondaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new b(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",!0,"exact")});return k(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=u.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>T(7)});return k(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=u.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>T(4.5)});return k(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=u.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===s.TONAL_SPOT?w(e.tertiaryPalette,0,90):w(e.tertiaryPalette):e.variant===s.EXPRESSIVE||e.variant===s.VIBRANT?w(e.tertiaryPalette,0,A.isCyan(e.tertiaryPalette.hue)?88:e.isDark?98:100):e.isDark?w(e.tertiaryPalette,0,98):w(e.tertiaryPalette),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7),toneDeltaPair:e=>e.platform==="phone"?new b(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",!0,"farther"):void 0});return k(super.tertiary(),"2025",t)}tertiaryDim(){return u.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===s.TONAL_SPOT?w(t.tertiaryPalette,0,90):w(t.tertiaryPalette),isBackground:!0,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>T(4.5),toneDeltaPair:t=>new b(this.tertiaryDim(),this.tertiary(),5,"darker",!0,"farther")})}onTertiary(){let t=u.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,background:e=>e.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=u.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===s.TONAL_SPOT?w(e.tertiaryPalette,0,90):w(e.tertiaryPalette):e.variant===s.NEUTRAL?e.isDark?w(e.tertiaryPalette,0,93):w(e.tertiaryPalette,0,96):e.variant===s.TONAL_SPOT?w(e.tertiaryPalette,0,e.isDark?93:100):e.variant===s.EXPRESSIVE?w(e.tertiaryPalette,75,A.isCyan(e.tertiaryPalette.hue)?88:e.isDark?93:100):e.isDark?w(e.tertiaryPalette,0,93):w(e.tertiaryPalette,72,100),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new b(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=u.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryContainer(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=u.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:!1,contrastLevel:0});return this.tertiaryContainer().getTone(n)},isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=u.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>this.tertiaryFixed().getTone(e),isBackground:!0,toneDeltaPair:e=>new b(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",!0,"exact")});return k(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=u.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>T(7)});return k(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=u.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>T(4.5)});return k(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=u.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.platform==="phone"?e.isDark?nt(e.errorPalette,0,98):w(e.errorPalette):nt(e.errorPalette),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7),toneDeltaPair:e=>e.platform==="phone"?new b(this.errorContainer(),this.error(),5,"relative_lighter",!0,"farther"):void 0});return k(super.error(),"2025",t)}errorDim(){return u.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>nt(t.errorPalette),isBackground:!0,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>T(4.5),toneDeltaPair:t=>new b(this.errorDim(),this.error(),5,"darker",!0,"farther")})}onError(){let t=u.fromPalette({name:"on_error",palette:e=>e.errorPalette,background:e=>e.platform==="phone"?this.error():this.errorDim(),contrastCurve:e=>e.platform==="phone"?T(6):T(7)});return k(super.onError(),"2025",t)}errorContainer(){let t=u.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.platform==="watch"?30:e.isDark?nt(e.errorPalette,30,93):w(e.errorPalette,0,90),isBackground:!0,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new b(this.errorContainer(),this.errorDim(),10,"darker",!0,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?T(1.5):void 0});return k(super.errorContainer(),"2025",t)}onErrorContainer(){let t=u.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,background:e=>this.errorContainer(),contrastCurve:e=>e.platform==="phone"?T(4.5):T(7)});return k(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return k(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return k(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return k(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:e=>e.platform==="watch"?100:this.onSurface().getTone(e)});return k(super.onBackground(),"2025",t)}};var l=class r{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(t=>t!==void 0)}highestSurface(t){return r.colorSpec.highestSurface(t)}primaryPaletteKeyColor(){return r.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return r.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return r.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return r.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return r.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return r.colorSpec.errorPaletteKeyColor()}background(){return r.colorSpec.background()}onBackground(){return r.colorSpec.onBackground()}surface(){return r.colorSpec.surface()}surfaceDim(){return r.colorSpec.surfaceDim()}surfaceBright(){return r.colorSpec.surfaceBright()}surfaceContainerLowest(){return r.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return r.colorSpec.surfaceContainerLow()}surfaceContainer(){return r.colorSpec.surfaceContainer()}surfaceContainerHigh(){return r.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return r.colorSpec.surfaceContainerHighest()}onSurface(){return r.colorSpec.onSurface()}surfaceVariant(){return r.colorSpec.surfaceVariant()}onSurfaceVariant(){return r.colorSpec.onSurfaceVariant()}outline(){return r.colorSpec.outline()}outlineVariant(){return r.colorSpec.outlineVariant()}inverseSurface(){return r.colorSpec.inverseSurface()}inverseOnSurface(){return r.colorSpec.inverseOnSurface()}shadow(){return r.colorSpec.shadow()}scrim(){return r.colorSpec.scrim()}surfaceTint(){return r.colorSpec.surfaceTint()}primary(){return r.colorSpec.primary()}primaryDim(){return r.colorSpec.primaryDim()}onPrimary(){return r.colorSpec.onPrimary()}primaryContainer(){return r.colorSpec.primaryContainer()}onPrimaryContainer(){return r.colorSpec.onPrimaryContainer()}inversePrimary(){return r.colorSpec.inversePrimary()}primaryFixed(){return r.colorSpec.primaryFixed()}primaryFixedDim(){return r.colorSpec.primaryFixedDim()}onPrimaryFixed(){return r.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return r.colorSpec.onPrimaryFixedVariant()}secondary(){return r.colorSpec.secondary()}secondaryDim(){return r.colorSpec.secondaryDim()}onSecondary(){return r.colorSpec.onSecondary()}secondaryContainer(){return r.colorSpec.secondaryContainer()}onSecondaryContainer(){return r.colorSpec.onSecondaryContainer()}secondaryFixed(){return r.colorSpec.secondaryFixed()}secondaryFixedDim(){return r.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return r.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return r.colorSpec.onSecondaryFixedVariant()}tertiary(){return r.colorSpec.tertiary()}tertiaryDim(){return r.colorSpec.tertiaryDim()}onTertiary(){return r.colorSpec.onTertiary()}tertiaryContainer(){return r.colorSpec.tertiaryContainer()}onTertiaryContainer(){return r.colorSpec.onTertiaryContainer()}tertiaryFixed(){return r.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return r.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return r.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return r.colorSpec.onTertiaryFixedVariant()}error(){return r.colorSpec.error()}errorDim(){return r.colorSpec.errorDim()}onError(){return r.colorSpec.onError()}errorContainer(){return r.colorSpec.errorContainer()}onErrorContainer(){return r.colorSpec.onErrorContainer()}static highestSurface(t){return r.colorSpec.highestSurface(t)}};l.contentAccentToneDelta=15;l.colorSpec=new Et;l.primaryPaletteKeyColor=l.colorSpec.primaryPaletteKeyColor();l.secondaryPaletteKeyColor=l.colorSpec.secondaryPaletteKeyColor();l.tertiaryPaletteKeyColor=l.colorSpec.tertiaryPaletteKeyColor();l.neutralPaletteKeyColor=l.colorSpec.neutralPaletteKeyColor();l.neutralVariantPaletteKeyColor=l.colorSpec.neutralVariantPaletteKeyColor();l.background=l.colorSpec.background();l.onBackground=l.colorSpec.onBackground();l.surface=l.colorSpec.surface();l.surfaceDim=l.colorSpec.surfaceDim();l.surfaceBright=l.colorSpec.surfaceBright();l.surfaceContainerLowest=l.colorSpec.surfaceContainerLowest();l.surfaceContainerLow=l.colorSpec.surfaceContainerLow();l.surfaceContainer=l.colorSpec.surfaceContainer();l.surfaceContainerHigh=l.colorSpec.surfaceContainerHigh();l.surfaceContainerHighest=l.colorSpec.surfaceContainerHighest();l.onSurface=l.colorSpec.onSurface();l.surfaceVariant=l.colorSpec.surfaceVariant();l.onSurfaceVariant=l.colorSpec.onSurfaceVariant();l.inverseSurface=l.colorSpec.inverseSurface();l.inverseOnSurface=l.colorSpec.inverseOnSurface();l.outline=l.colorSpec.outline();l.outlineVariant=l.colorSpec.outlineVariant();l.shadow=l.colorSpec.shadow();l.scrim=l.colorSpec.scrim();l.surfaceTint=l.colorSpec.surfaceTint();l.primary=l.colorSpec.primary();l.onPrimary=l.colorSpec.onPrimary();l.primaryContainer=l.colorSpec.primaryContainer();l.onPrimaryContainer=l.colorSpec.onPrimaryContainer();l.inversePrimary=l.colorSpec.inversePrimary();l.secondary=l.colorSpec.secondary();l.onSecondary=l.colorSpec.onSecondary();l.secondaryContainer=l.colorSpec.secondaryContainer();l.onSecondaryContainer=l.colorSpec.onSecondaryContainer();l.tertiary=l.colorSpec.tertiary();l.onTertiary=l.colorSpec.onTertiary();l.tertiaryContainer=l.colorSpec.tertiaryContainer();l.onTertiaryContainer=l.colorSpec.onTertiaryContainer();l.error=l.colorSpec.error();l.onError=l.colorSpec.onError();l.errorContainer=l.colorSpec.errorContainer();l.onErrorContainer=l.colorSpec.onErrorContainer();l.primaryFixed=l.colorSpec.primaryFixed();l.primaryFixedDim=l.colorSpec.primaryFixedDim();l.onPrimaryFixed=l.colorSpec.onPrimaryFixed();l.onPrimaryFixedVariant=l.colorSpec.onPrimaryFixedVariant();l.secondaryFixed=l.colorSpec.secondaryFixed();l.secondaryFixedDim=l.colorSpec.secondaryFixedDim();l.onSecondaryFixed=l.colorSpec.onSecondaryFixed();l.onSecondaryFixedVariant=l.colorSpec.onSecondaryFixedVariant();l.tertiaryFixed=l.colorSpec.tertiaryFixed();l.tertiaryFixedDim=l.colorSpec.tertiaryFixedDim();l.onTertiaryFixed=l.colorSpec.onTertiaryFixed();l.onTertiaryFixedVariant=l.colorSpec.onTertiaryFixedVariant();var D=class r{static maybeFallbackSpecVersion(t,e){switch(e){case s.EXPRESSIVE:case s.VIBRANT:case s.TONAL_SPOT:case s.NEUTRAL:return t;default:return"2021"}}constructor(t){this.sourceColorArgb=t.sourceColorHct.toInt(),this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.platform=t.platform??"phone",this.specVersion=r.maybeFallbackSpecVersion(t.specVersion??"2021",this.variant),this.sourceColorHct=t.sourceColorHct,this.primaryPalette=t.primaryPalette??ht(this.specVersion).getPrimaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=t.secondaryPalette??ht(this.specVersion).getSecondaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=t.tertiaryPalette??ht(this.specVersion).getTertiaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=t.neutralPalette??ht(this.specVersion).getNeutralPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=t.neutralVariantPalette??ht(this.specVersion).getNeutralVariantPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=t.errorPalette??ht(this.specVersion).getErrorPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??P.fromHueAndChroma(25,84),this.colors=new l}toString(){return`Scheme: variant=${s[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(t,e,n){let a=Math.min(e.length-1,n.length),o=t.hue;for(let i=0;i=e[i]&&o=105&&i<125?1.6:2.3));case s.VIBRANT:let m=r.getVibrantNeutralHue(e),p=r.getVibrantNeutralChroma(e,a);return P.fromHueAndChroma(m,p*1.29);default:return super.getNeutralVariantPalette(t,e,n,a,o)}}getErrorPalette(t,e,n,a,o){let i=D.getPiecewiseHue(e,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(t){case s.NEUTRAL:return P.fromHueAndChroma(i,a==="phone"?50:40);case s.TONAL_SPOT:return P.fromHueAndChroma(i,a==="phone"?60:48);case s.EXPRESSIVE:return P.fromHueAndChroma(i,a==="phone"?64:48);case s.VIBRANT:return P.fromHueAndChroma(i,a==="phone"?80:60);default:return super.getErrorPalette(t,e,n,a,o)}}},Ue=new It,_e=new te;function ht(r){return r==="2025"?_e:Ue}var Mt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.CONTENT,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Bt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.EXPRESSIVE,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Rt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.FIDELITY,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Ot=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.FRUIT_SALAD,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Lt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.MONOCHROME,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Vt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.NEUTRAL,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Nt=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.RAINBOW,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Ht=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.TONAL_SPOT,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var Ut=class extends D{constructor(t,e,n,a=D.DEFAULT_SPEC_VERSION,o=D.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.VIBRANT,contrastLevel:n,isDark:e,platform:o,specVersion:a})}};var ze={desired:4,fallbackColorARGB:4282549748,filter:!0};function $e(r,t){return r.score>t.score?-1:r.score=15;y--){S.length=0;for(let{hct:f}of d)if(S.find(C=>wt(f.hue,C.hue)=n)break;if(S.length>=n)break}let g=[];S.length===0&&g.push(a);for(let y of S)g.push(y.toInt());return g}};Q.TARGET_CHROMA=48;Q.WEIGHT_PROPORTION=.7;Q.WEIGHT_CHROMA_ABOVE=.3;Q.WEIGHT_CHROMA_BELOW=.1;Q.CUTOFF_CHROMA=5;Q.CUTOFF_EXCITED_PROPORTION=.01;function _t(r){let t=gt(r),e=yt(r),n=Pt(r),a=[t.toString(16),e.toString(16),n.toString(16)];for(let[o,i]of a.entries())i.length===1&&(a[o]="0"+i);return"#"+a.join("")}function zt(r){r=r.replace("#","");let t=r.length===3,e=r.length===6,n=r.length===8;if(!t&&!e&&!n)throw new Error("unexpected hex "+r);let a=0,o=0,i=0;return t?(a=tt(r.slice(0,1).repeat(2)),o=tt(r.slice(1,2).repeat(2)),i=tt(r.slice(2,3).repeat(2))):e?(a=tt(r.slice(0,2)),o=tt(r.slice(2,4)),i=tt(r.slice(4,6))):n&&(a=tt(r.slice(2,4)),o=tt(r.slice(4,6)),i=tt(r.slice(6,8))),(255<<24|(a&255)<<16|(o&255)<<8|i&255)>>>0}function tt(r){return parseInt(r,16)}var Te={"tonal-spot":Ht,vibrant:Ut,expressive:Bt,neutral:Vt,fidelity:Rt,content:Mt,monochrome:Lt,rainbow:Nt,"fruit-salad":Ot},$t={standard:0,medium:.5,high:1},Ge=/_palette_key_color$/,ae=["success","warning","info"];function ft(r){process.stderr.write(`${r} +`),process.exit(1)}var $;try{$=JSON.parse(process.argv[2]??"")}catch{ft('Expected one JSON argument: {"seed": "#rrggbb", "variant": "tonal-spot", ...}')}var De=/^#[0-9a-f]{6}$/i,be=Te[$.variant],Ce=["2021","2025"],ne=$.spec??"2025";De.test($.seed??"")||ft(`The seed must be a #rrggbb colour, "${$.seed}" given.`);be||ft(`Unknown variant "${$.variant}". Use one of: ${Object.keys(Te).join(", ")}.`);Ce.includes(ne)||ft(`Unknown spec "${ne}". Use one of: ${Ce.join(", ")}.`);for(let r of ae)De.test($[r]??"")||ft(`The ${r} colour must be a #rrggbb colour, "${$[r]}" given.`);var Gt=Number($.contrast??0),we=!!($.harmonize??!1);Gt>=-1&&Gt<$t.medium||ft(`The standard contrast level runs from -1 to below ${$t.medium}, "${$.contrast}" given; medium and high are generated as their own blocks.`);var Ye=A.fromInt(zt($.seed)),mt=new l;function st(r){return{1.5:new x(1.5,1.5,3,5.5),3:new x(3,3,4.5,7),4.5:new x(4.5,4.5,7,11),6:new x(6,6,7,11),7:new x(7,7,11,21)}[r]}function ve(r,t,e,n){let a=e,o=A.from(r,t,a);for(;o.chroma100);){e+=n?-1:1;let i=A.from(r,t,e);o.chromat,n,a,o,i;return n=k(u.fromPalette({name:r,palette:e,tone:c=>c.isDark?80:40,isBackground:!0,background:c=>mt.highestSurface(c),contrastCurve:()=>new x(3,4.5,7,7),toneDeltaPair:()=>new b(o,n,10,"nearer",!1)}),"2025",u.fromPalette({name:r,palette:e,tone:c=>c.platform==="phone"?c.isDark?ee(t,0,98):Se(t):ee(t),isBackground:!0,background:c=>c.platform==="phone"?mt.highestSurface(c):mt.surfaceContainerHigh(),contrastCurve:c=>c.platform==="phone"?st(4.5):st(7),toneDeltaPair:c=>c.platform==="phone"?new b(o,n,5,"relative_lighter",!0,"farther"):void 0})),a=k(u.fromPalette({name:`on_${r}`,palette:e,tone:c=>c.isDark?20:100,background:()=>n,contrastCurve:()=>new x(4.5,7,11,21)}),"2025",u.fromPalette({name:`on_${r}`,palette:e,background:()=>n,contrastCurve:c=>c.platform==="phone"?st(6):st(7)})),o=k(u.fromPalette({name:`${r}_container`,palette:e,tone:c=>c.isDark?30:90,isBackground:!0,background:c=>mt.highestSurface(c),contrastCurve:()=>new x(1,1,3,4.5),toneDeltaPair:()=>new b(o,n,10,"nearer",!1)}),"2025",u.fromPalette({name:`${r}_container`,palette:e,tone:c=>c.platform==="watch"?30:c.isDark?ee(t,30,93):Se(t,0,90),isBackground:!0,background:c=>c.platform==="phone"?mt.highestSurface(c):void 0,toneDeltaPair:c=>c.platform==="watch"?new b(o,n,10,"darker",!0,"farther"):void 0,contrastCurve:c=>c.platform==="phone"&&c.contrastLevel>0?st(1.5):void 0})),i=k(u.fromPalette({name:`on_${r}_container`,palette:e,tone:c=>c.variant===s.MONOCHROME?c.isDark?90:10:c.isDark?90:30,background:()=>o,contrastCurve:()=>new x(3,4.5,7,11)}),"2025",u.fromPalette({name:`on_${r}_container`,palette:e,background:()=>o,contrastCurve:c=>c.platform==="phone"?st(4.5):st(7)})),{[r]:n,[`on-${r}`]:a,[`${r}-container`]:o,[`on-${r}-container`]:i}}var Xe=Object.assign({},...ae.map(r=>{let t=zt($[r]);return Ke(r,P.fromInt(we?xt.harmonize(t,zt($.seed)):t))}));function xe(r,t){let e=new be(Ye,r,t,ne),n={};for(let a of mt.allColors)a&&!Ge.test(a.name)&&(n[a.name.replaceAll("_","-")]=_t(a.getArgb(e)));for(let[a,o]of Object.entries(Xe))n[a]=_t(o.getArgb(e));return{scheme:e,out:n}}function oe(r){let t=xe(!1,r),e=xe(!0,r);for(let n of["error",...ae])t.out[`inverse-${n}`]=e.out[n],e.out[`inverse-${n}`]=t.out[n];return{spec:t.scheme.specVersion,light:t.out,dark:e.out}}var re=oe(Gt),Ae=oe($t.medium),ke=oe($t.high);process.stdout.write(JSON.stringify({seed:$.seed.toLowerCase(),variant:$.variant,spec:re.spec,harmonize:we,contrast:{standard:Gt,medium:{light:Ae.light,dark:Ae.dark},high:{light:ke.light,dark:ke.dark}},light:re.light,dark:re.dark})); /*! Bundled license information: @material/material-color-utilities/utils/math_utils.js: diff --git a/src/Console/SchemeCommand.php b/src/Console/SchemeCommand.php index 01ed43ca..0b89213a 100644 --- a/src/Console/SchemeCommand.php +++ b/src/Console/SchemeCommand.php @@ -19,7 +19,8 @@ class SchemeCommand extends Command {seed? : The source colour, as #rrggbb; without it, every profile in livewire-material.profiles} {--variant=tonal-spot : tonal-spot, vibrant, expressive, neutral, fidelity, content, monochrome, rainbow or fruit-salad} {--spec=2025 : The colour spec: 2025 (M3 Expressive) or 2021 (M3 as it first shipped)} - {--contrast=0 : The contrast level, from -1 to 1} + {--contrast=0 : The standard level\'s contrast, from -1 to below 0.5; medium and high are always generated} + {--harmonize : Pull the success, warning and info colours towards the seed} {--success=#22a06b : The source of the success colour} {--warning=#e2a400 : The source of the warning colour} {--info=#1d7afc : The source of the info colour} @@ -38,6 +39,16 @@ class SchemeCommand extends Command */ protected const SPECS = ['2021', '2025']; + /** + * M3's other two contrast levels, generated for every scheme beside the standard one and + * keyed on (styles/color/roles, "What's new May 2025"): medium is + * 3:1 on the roles that carry text, high 7:1. Their levels are Google's, not the + * installation's — `--contrast` moves the standard block alone. + * + * @var array + */ + protected const LEVELS = ['medium' => 0.5, 'high' => 1.0]; + public function handle(Filesystem $files): int { $stylesheet = $this->option('output') ?: resource_path('css/material-scheme.css'); @@ -51,11 +62,16 @@ class SchemeCommand extends Command } if (filled($this->argument('seed'))) { + if ($this->refusesContrast((float) $this->option('contrast'))) { + return self::FAILURE; + } + $input = [ 'seed' => (string) $this->argument('seed'), 'variant' => (string) $this->option('variant'), 'spec' => $spec, 'contrast' => (float) $this->option('contrast'), + 'harmonize' => (bool) $this->option('harmonize'), 'success' => (string) $this->option('success'), 'warning' => (string) $this->option('warning'), 'info' => (string) $this->option('info'), @@ -87,12 +103,17 @@ class SchemeCommand extends Command return self::FAILURE; } + if ($this->refusesContrast((float) ($profile['contrast'] ?? 0), "Profile \"{$name}\": ")) { + return self::FAILURE; + } + // A profile's own spec and state colours win; without them, the command's options apply. $scheme = $this->generate([ 'seed' => (string) ($profile['seed'] ?? ''), 'variant' => (string) ($profile['variant'] ?? 'tonal-spot'), 'spec' => (string) ($profile['spec'] ?? $spec), 'contrast' => (float) ($profile['contrast'] ?? 0), + 'harmonize' => (bool) ($profile['harmonize'] ?? $this->option('harmonize')), 'success' => (string) ($profile['success'] ?? $this->option('success')), 'warning' => (string) ($profile['warning'] ?? $this->option('warning')), 'info' => (string) ($profile['info'] ?? $this->option('info')), @@ -115,11 +136,33 @@ class SchemeCommand extends Command ]); } + /** + * Whether the given standard contrast level is one this command generates, having said why + * it is not. Medium and high are M3's own levels and always generated; `--contrast` moves + * the standard block, which has to stay below them. + */ + protected function refusesContrast(float $contrast, string $context = ''): bool + { + if ($contrast >= self::LEVELS['medium'] || $contrast < -1) { + $this->components->error($context.sprintf( + 'The contrast level %s is the standard block\'s, from -1 to below %s. Medium (%s) and high (%s) are always generated beside it, under [data-contrast]; the head script picks one.', + $contrast, + self::LEVELS['medium'], + self::LEVELS['medium'], + self::LEVELS['high'], + )); + + return true; + } + + return false; + } + /** * One scheme from Google's colour utilities, or null once the reason has been shown. * - * @param array{seed: string, variant: string, spec: string, contrast: float, success: string, warning: string, info: string} $input - * @return array{seed: string, variant: string, spec: string, contrast: float, light: array, dark: array}|null + * @param array{seed: string, variant: string, spec: string, contrast: float, harmonize: bool, success: string, warning: string, info: string} $input + * @return array{seed: string, variant: string, spec: string, harmonize: bool, contrast: array{standard: float, medium: array{light: array, dark: array}, high: array{light: array, dark: array}}, light: array, dark: array}|null */ protected function generate(array $input, string $context = ''): ?array { @@ -162,8 +205,8 @@ class SchemeCommand extends Command * The stylesheet, headed by the command that regenerates it: every option that differs from * its default is written out. * - * @param array{seed: string, variant: string, spec: string, contrast: float, light: array, dark: array} $scheme - * @param array{seed: string, variant: string, spec: string, contrast: float, success: string, warning: string, info: string} $input + * @param array{seed: string, variant: string, spec: string, harmonize: bool, contrast: array, light: array, dark: array} $scheme + * @param array{seed: string, variant: string, spec: string, contrast: float, harmonize: bool, success: string, warning: string, info: string} $input */ protected function stylesheet(array $scheme, array $input): string { @@ -173,15 +216,16 @@ class SchemeCommand extends Command ->implode(''); $command = sprintf( - 'php artisan material:scheme "%s" --variant=%s%s%s%s', + 'php artisan material:scheme "%s" --variant=%s%s%s%s%s', $scheme['seed'], $scheme['variant'], $input['spec'] !== '2025' ? ' --spec='.$input['spec'] : '', - $scheme['contrast'] != 0 ? ' --contrast='.$scheme['contrast'] : '', + $scheme['contrast']['standard'] != 0 ? ' --contrast='.$scheme['contrast']['standard'] : '', + $scheme['harmonize'] ? ' --harmonize' : '', $states, ); - $blocks = $this->blocks([':root', "[data-theme='light']"], ["[data-theme='dark']"], $scheme); + $blocks = $this->levels($scheme); return <<, dark: array}> $profiles + * @param array, light: array, dark: array}> $profiles */ protected function profilesStylesheet(array $profiles, string $default): string { $list = collect($profiles) ->map(fn (array $profile, string $name): string => sprintf( - ' * %-12s %s, %s%s%s', + ' * %-12s %s, %s%s%s%s', $name, $profile['seed'], $profile['variant'], $profile['spec'] !== $profiles[$default]['spec'] ? ', spec '.$profile['spec'] : '', - $profile['contrast'] != 0 ? ', contrast '.$profile['contrast'] : '', + $profile['contrast']['standard'] != 0 ? ', contrast '.$profile['contrast']['standard'] : '', + $profile['harmonize'] ? ', harmonized' : '', )) ->implode("\n"); @@ -232,25 +282,68 @@ class SchemeCommand extends Command {$list} * * Regenerate rather than editing a value: every pair here (a role and its on-role) carries - * M3's contrast guarantee only as generated. The head script sets data-theme and data-scheme - * before the first paint. + * M3's contrast guarantee only as generated. The head script sets data-theme, data-scheme + * and data-contrast before the first paint. */ CSS; - $css .= "\n".$this->blocks([':root', "[data-theme='light']"], ["[data-theme='dark']"], $profiles[$default]); + $css .= "\n".$this->levels($profiles[$default]); foreach ($profiles as $name => $profile) { - $css .= "\n".$this->blocks( - ["[data-scheme='{$name}']", "[data-scheme='{$name}'][data-theme='light']", "[data-scheme='{$name}'] [data-theme='light']"], - ["[data-scheme='{$name}'][data-theme='dark']", "[data-scheme='{$name}'] [data-theme='dark']"], - $profile, - ); + $css .= "\n".$this->levels($profile, "[data-scheme='{$name}']"); } return $css; } + /** + * One scheme, whole: the standard level first, then M3's medium and high under + * data-contrast. A level's blocks are the standard ones with one more attribute, so they + * outrank them wherever both match, and the light blocks of a level come before its dark + * ones as in every other pair here. The nested `[data-contrast='high'] [data-theme='light']` + * form keeps a light panel inside a high-contrast dark page on the level the page asked for + * — the plain `[data-theme='light']` block would otherwise take it back to standard. + * + * @param array{contrast: array, light: array, dark: array} $scheme + */ + protected function levels(array $scheme, string $prefix = ''): string + { + [$light, $dark] = $this->selectors($prefix); + + $css = $this->blocks($light, $dark, $scheme); + + foreach (array_keys(self::LEVELS) as $level) { + [$light, $dark] = $this->selectors($prefix."[data-contrast='{$level}']"); + + /** @var array{light: array, dark: array} $roles */ + $roles = $scheme['contrast'][$level]; + + $css .= "\n".$this->blocks($light, $dark, $roles); + } + + return $css; + } + + /** + * The light and the dark selectors of one block, under the given prefix. Without a prefix + * the plain blocks stand on `:root` and on the attribute alone; with one, the prefix is on + * and the theme may be on or on a panel inside it, so both forms are written. + * + * @return array{list, list} + */ + protected function selectors(string $prefix): array + { + if ($prefix === '') { + return [[':root', "[data-theme='light']"], ["[data-theme='dark']"]]; + } + + return [ + [$prefix, "{$prefix}[data-theme='light']", "{$prefix} [data-theme='light']"], + ["{$prefix}[data-theme='dark']", "{$prefix} [data-theme='dark']"], + ]; + } + /** * A light and a dark block of roles under the given selectors. * diff --git a/src/Support/Scheme.php b/src/Support/Scheme.php index a4fdc900..7a47237e 100644 --- a/src/Support/Scheme.php +++ b/src/Support/Scheme.php @@ -18,6 +18,11 @@ use Throwable; * the role existed) is taken from the default, and a value that is not a #rrggbb hex is * refused, so nothing but a colour ever reaches a stylesheet. * + * The roles at the top level are the standard contrast level; M3's medium and high levels sit + * under `contrast` and are asked for by name (`load($path, $profile, 'high')`). A file written + * before the levels existed — or one whose level is missing a role — falls back to the standard + * roles, so a mail or an error page never draws a hole. + * * A file generated from `livewire-material.profiles` holds every profile under `profiles`, its * default under `default`, and the default's roles at the top level as a single scheme does. Which * profile is active is the application's to say, through resolveProfileUsing(); the resolver is @@ -30,6 +35,14 @@ use Throwable; */ class Scheme { + /** + * M3's contrast levels, as `material:scheme` writes them and as names + * them. `standard` is the scheme's own level and has no attribute. + * + * @var list + */ + public const LEVELS = ['standard', 'medium', 'high']; + /** * @var (Closure(): ?string)|null */ @@ -46,14 +59,15 @@ class Scheme } /** - * The roles to draw: the given profile's, the active profile's, or the single scheme's. + * The roles to draw: the given profile's, the active profile's, or the single scheme's, at + * the given contrast level (`standard`, `medium` or `high`; anything else is standard). * * @return array{light: array, dark: array} */ - public static function load(?string $path = null, ?string $profile = null): array + public static function load(?string $path = null, ?string $profile = null, string $contrast = 'standard'): array { $data = static::data($path); - $profiles = static::profilesFrom($data); + $profiles = static::profilesFrom($data, $contrast); if ($profiles !== []) { $name = $profile !== null && isset($profiles[$profile]) ? $profile : static::activeFrom($data, $profiles); @@ -61,13 +75,7 @@ class Scheme return ['light' => $profiles[$name]['light'], 'dark' => $profiles[$name]['dark']]; } - $default = static::defaultScheme(); - $scheme = ['light' => static::roles($data['light'] ?? null), 'dark' => static::roles($data['dark'] ?? null)]; - - return [ - 'light' => [...$default['light'], ...$scheme['light']], - 'dark' => [...$default['dark'], ...$scheme['dark']], - ]; + return static::scheme($data, $contrast); } /** @@ -75,9 +83,9 @@ class Scheme * * @return array */ - public static function light(?string $path = null, ?string $profile = null): array + public static function light(?string $path = null, ?string $profile = null, string $contrast = 'standard'): array { - return static::load($path, $profile)['light']; + return static::load($path, $profile, $contrast)['light']; } /** @@ -85,9 +93,9 @@ class Scheme * * @return array, dark: array}> */ - public static function profiles(?string $path = null): array + public static function profiles(?string $path = null, string $contrast = 'standard'): array { - return static::profilesFrom(static::data($path)); + return static::profilesFrom(static::data($path), $contrast); } /** @@ -116,13 +124,12 @@ class Scheme * @param array $data * @return array, dark: array}> */ - protected static function profilesFrom(array $data): array + protected static function profilesFrom(array $data, string $contrast = 'standard'): array { if (! is_array($data['profiles'] ?? null)) { return []; } - $default = static::defaultScheme(); $profiles = []; foreach ($data['profiles'] as $name => $profile) { @@ -132,14 +139,32 @@ class Scheme $profiles[$name] = [ 'label' => is_string($profile['label'] ?? null) ? $profile['label'] : Str::headline($name), - 'light' => [...$default['light'], ...static::roles($profile['light'] ?? null)], - 'dark' => [...$default['dark'], ...static::roles($profile['dark'] ?? null)], + ...static::scheme($profile, $contrast), ]; } return $profiles; } + /** + * One scheme's roles at one contrast level: the level's own, over the standard ones it does + * not name, over the package's default. A scheme file written before the levels existed has + * only the standard roles, and draws them at every level rather than nothing. + * + * @param array $data + * @return array{light: array, dark: array} + */ + protected static function scheme(array $data, string $contrast): array + { + $default = static::defaultScheme($contrast); + $level = is_array($data['contrast'][$contrast] ?? null) ? $data['contrast'][$contrast] : []; + + return [ + 'light' => [...$default['light'], ...static::roles($data['light'] ?? null), ...static::roles($level['light'] ?? null)], + 'dark' => [...$default['dark'], ...static::roles($data['dark'] ?? null), ...static::roles($level['dark'] ?? null)], + ]; + } + /** * @param array $data * @param non-empty-array $profiles @@ -162,15 +187,19 @@ class Scheme } /** - * The package's own scheme, which fills any role a file lacks. + * The package's own scheme at one contrast level, which fills any role a file lacks. * * @return array{light: array, dark: array} */ - protected static function defaultScheme(): array + protected static function defaultScheme(string $contrast = 'standard'): array { $data = json_decode((string) file_get_contents(dirname(__DIR__, 2).'/resources/css/tokens/scheme.json'), true); + $level = is_array($data['contrast'][$contrast] ?? null) ? $data['contrast'][$contrast] : []; - return ['light' => static::roles($data['light'] ?? null), 'dark' => static::roles($data['dark'] ?? null)]; + return [ + 'light' => [...static::roles($data['light'] ?? null), ...static::roles($level['light'] ?? null)], + 'dark' => [...static::roles($data['dark'] ?? null), ...static::roles($level['dark'] ?? null)], + ]; } /** diff --git a/tests/Feature/SchemeCommandTest.php b/tests/Feature/SchemeCommandTest.php index ffa13d8d..5e1621dc 100644 --- a/tests/Feature/SchemeCommandTest.php +++ b/tests/Feature/SchemeCommandTest.php @@ -3,6 +3,37 @@ use Illuminate\Support\Facades\File; use Illuminate\Support\Str; +/** + * The hue of a #rrggbb colour, in degrees: what harmonisation moves. + */ +function schemeHue(string $hex): float +{ + [$r, $g, $b] = array_map(fn (string $channel): float => hexdec($channel) / 255, str_split(ltrim($hex, '#'), 2)); + $chroma = max($r, $g, $b) - min($r, $g, $b); + + if ($chroma === 0.0) { + return 0.0; + } + + $sector = match (max($r, $g, $b)) { + $r => fmod(($g - $b) / $chroma, 6), + $g => (($b - $r) / $chroma) + 2, + default => (($r - $g) / $chroma) + 4, + }; + + return fmod(($sector * 60) + 360, 360); +} + +/** + * How far apart two colours are on the hue circle, the short way round. + */ +function schemeHueDistance(string $one, string $other): float +{ + $apart = abs(schemeHue($one) - schemeHue($other)); + + return min($apart, 360 - $apart); +} + beforeEach(function () { $this->stylesheet = sys_get_temp_dir().'/material-scheme-'.Str::random(8).'.css'; $this->data = Str::replaceLast('.css', '.json', $this->stylesheet); @@ -23,6 +54,8 @@ it('writes the scheme as a stylesheet and as data', function () { ->seed->toBe('#4f46e5') ->variant->toBe('tonal-spot') ->spec->toBe('2025') + ->harmonize->toBeFalse() + ->and($scheme['contrast']['standard'])->toBe(0) ->and(array_keys($scheme['dark']))->toEqual(array_keys($scheme['light'])) ->and($scheme['light'])->toHaveKeys(['primary', 'on-primary', 'tertiary-container', 'surface-container-high', 'outline-variant', 'success', 'on-warning-container', 'info-container']) ->and($scheme['light']['surface'])->not->toBe($scheme['dark']['surface']) @@ -41,6 +74,137 @@ it('writes the scheme as a stylesheet and as data', function () { expect($stylesheet)->toContain('php artisan material:scheme "#4f46e5" --variant=tonal-spot'); }); +it('writes M3\'s three contrast levels for both themes, keyed on data-contrast', function () { + $this->artisan('material:scheme', ['seed' => '#4f46e5', '--output' => $this->stylesheet]) + ->assertSuccessful(); + + $scheme = json_decode(File::get($this->data), true); + $stylesheet = File::get($this->stylesheet); + + // The standard level keeps the 1.x shape at the top; the other two sit under `contrast`. + expect(array_keys($scheme['contrast']))->toBe(['standard', 'medium', 'high']) + ->and(array_keys($scheme['contrast']['medium']['light']))->toEqual(array_keys($scheme['light'])) + ->and(array_keys($scheme['contrast']['high']['dark']))->toEqual(array_keys($scheme['dark'])); + + foreach (['medium', 'high'] as $level) { + foreach (['light' => "[data-contrast='{$level}'] [data-theme='light'] {", 'dark' => "[data-contrast='{$level}'] [data-theme='dark'] {"] as $theme => $selector) { + $block = Str::of($stylesheet)->after($selector)->before('}')->toString(); + + expect($block)->toContain("color-scheme: {$theme};"); + + foreach ($scheme['contrast'][$level][$theme] as $role => $hex) { + expect($block)->toContain("--md-sys-color-{$role}: {$hex};"); + } + } + + expect($stylesheet) + ->toContain("[data-contrast='{$level}'],\n[data-contrast='{$level}'][data-theme='light'],") + ->toContain("[data-contrast='{$level}'][data-theme='dark'],"); + } + + // Every level differs from the one below it, in both themes and for the state colours too. + foreach (['light', 'dark'] as $theme) { + foreach (['on-surface-variant', 'outline', 'success', 'info', 'success-container'] as $role) { + expect($scheme['contrast']['medium'][$theme][$role]) + ->not->toBe($scheme[$theme][$role], "medium {$theme} {$role}") + ->not->toBe($scheme['contrast']['high'][$theme][$role], "high {$theme} {$role}"); + } + + // The state colours are dynamic colours now, so the level reaches them as it does a + // built-in role. (A container whose tone already clears the level's ratio stays put, + // exactly as error's does — hence the pairs rather than every one of the four.) + foreach (['success', 'warning', 'info'] as $state) { + foreach ([$state, "on-{$state}", "on-{$state}-container"] as $role) { + expect($scheme['contrast']['high'][$theme][$role])->not->toBe($scheme[$theme][$role], "high {$theme} {$role}"); + } + } + } + + expect($stylesheet)->not->toContain('prefers-contrast'); +}); + +it('puts a level\'s nested light blocks after the dark ones of the level below', function () { + $this->artisan('material:scheme', ['seed' => '#4f46e5', '--output' => $this->stylesheet]) + ->assertSuccessful(); + + $stylesheet = File::get($this->stylesheet); + $at = fn (string $selector): int => strpos($stylesheet, $selector); + + // A light panel inside a dark high-contrast page: its rule carries one attribute more than + // the plain dark block and stands after it, so it wins on specificity and on order. + expect($at("[data-theme='dark'] {"))->toBeLessThan($at("[data-contrast='high'] [data-theme='light'] {")) + ->and($at("[data-contrast='medium'] [data-theme='light'] {"))->toBeLessThan($at("[data-contrast='medium'][data-theme='dark'],")) + ->and($at("[data-contrast='medium'][data-theme='dark'],"))->toBeLessThan($at("[data-contrast='high'],")); +}); + +it('generates the levels for every profile, under its own data-scheme', function () { + config(['livewire-material.profiles' => [ + 'indigo' => ['seed' => '#4f46e5', 'variant' => 'vibrant'], + 'teal' => ['seed' => '#00897b', 'variant' => 'vibrant'], + ]]); + + $this->artisan('material:scheme', ['--output' => $this->stylesheet])->assertSuccessful(); + + $scheme = json_decode(File::get($this->data), true); + $stylesheet = File::get($this->stylesheet); + + foreach ($scheme['profiles'] as $name => $profile) { + foreach (['medium', 'high'] as $level) { + $selector = "[data-scheme='{$name}'][data-contrast='{$level}'] [data-theme='dark'] {"; + + expect(Str::of($stylesheet)->after($selector)->before('}')->toString()) + ->toContain("--md-sys-color-primary: {$profile['contrast'][$level]['dark']['primary']};") + ->and($profile['contrast'][$level]['light']['success'])->not->toBe($profile['light']['success']); + } + } + + // The default profile's plain blocks come first, its levels next, then every profile's. + expect(strpos($stylesheet, "[data-contrast='high'],"))->toBeLessThan(strpos($stylesheet, "[data-scheme='indigo'],")); +}); + +it('refuses a standard contrast level at or above the medium one', function () { + $this->artisan('material:scheme', ['seed' => '#4f46e5', '--contrast' => '0.5', '--output' => $this->stylesheet]) + ->expectsOutputToContain('Medium (0.5) and high (1) are always generated') + ->assertFailed(); + + expect(File::exists($this->stylesheet))->toBeFalse(); + + config(['livewire-material.profiles' => ['indigo' => ['seed' => '#4f46e5', 'contrast' => 1]]]); + + $this->artisan('material:scheme', ['--output' => $this->stylesheet]) + ->expectsOutputToContain('Profile "indigo": The contrast level 1') + ->assertFailed(); +}); + +it('keeps a standard level below medium, and records it in the header', function () { + $this->artisan('material:scheme', ['seed' => '#4f46e5', '--contrast' => '0.3', '--output' => $this->stylesheet]) + ->assertSuccessful(); + + $scheme = json_decode(File::get($this->data), true); + + expect($scheme['contrast']['standard'])->toBe(0.3) + ->and($scheme['light']['primary'])->not->toBe($scheme['contrast']['medium']['light']['primary']) + ->and(File::get($this->stylesheet))->toContain('php artisan material:scheme "#4f46e5" --variant=tonal-spot --contrast=0.3'); +}); + +it('harmonises the state colours towards the seed only when asked', function () { + $this->artisan('material:scheme', ['seed' => '#4f46e5', '--output' => $this->stylesheet])->assertSuccessful(); + $plain = json_decode(File::get($this->data), true); + + $this->artisan('material:scheme', ['seed' => '#4f46e5', '--harmonize' => true, '--output' => $this->stylesheet])->assertSuccessful(); + $harmonized = json_decode(File::get($this->data), true); + + expect($harmonized['harmonize'])->toBeTrue() + ->and($plain['harmonize'])->toBeFalse() + ->and(File::get($this->stylesheet))->toContain('--variant=tonal-spot --harmonize'); + + foreach (['success', 'warning', 'info'] as $state) { + expect(schemeHueDistance($harmonized['light'][$state], '#4f46e5')) + ->toBeLessThan(schemeHueDistance($plain['light'][$state], '#4f46e5'), "{$state} moved towards the seed") + ->and($harmonized['contrast']['high']['dark'][$state])->not->toBe($plain['contrast']['high']['dark'][$state]); + } +}); + it('generates a different scheme per variant', function () { $this->artisan('material:scheme', ['seed' => '#4f46e5', '--variant' => 'vibrant', '--output' => $this->stylesheet]) ->assertSuccessful(); @@ -177,7 +341,8 @@ it('takes a profile\'s own spec and state colours, and the command\'s for a prof ->and($profiles['expressive'])->spec->toBe('2025') ->and($profiles['expressive']['dark']['primary'])->not->toBe('#00e297') ->and($profiles['expressive']['dark']['success'])->not->toBe('#2ce19c') - ->and($profiles['expressive']['dark']['info'])->toBe('#80cfff') + // The state colours follow the spec now, so the same source is not the same colour. + ->and($profiles['expressive']['dark']['info'])->not->toBe('#80cfff') ->and(File::get($this->stylesheet)) ->toContain('(spec 2025)') ->toMatch('/ \* classic\s+#00bc7d, vibrant, spec 2021\n/') diff --git a/tests/Feature/SchemeTest.php b/tests/Feature/SchemeTest.php index befcc5ef..ed4e8e5f 100644 --- a/tests/Feature/SchemeTest.php +++ b/tests/Feature/SchemeTest.php @@ -19,6 +19,11 @@ function writeProfiles(string $path, array $primaries, string $default): void 'contrast' => 0, 'light' => ['primary' => $primary, 'surface' => '#fafafa'], 'dark' => ['primary' => '#eeeeee', 'surface' => '#111111'], + 'contrast' => [ + 'standard' => 0, + 'medium' => ['light' => ['primary' => '#332f8a'], 'dark' => ['surface' => '#0a0a0a']], + 'high' => ['light' => ['primary' => '#000000'], 'dark' => ['primary' => '#ffffff', 'surface' => '#000000']], + ], ])->all(); File::put($path, json_encode([...collect($profiles[$default])->except('label')->all(), 'default' => $default, 'profiles' => $profiles])); @@ -69,6 +74,29 @@ it('loads a profile by name, whatever is active', function () { ->and(Scheme::light($this->path, 'ocean')['primary'])->toBe('#00897b'); }); +it('loads a contrast level, falling back to the standard roles it does not name', function () { + expect(Scheme::load($this->path, 'teal', 'high')['light']['primary'])->toBe('#000000') + ->and(Scheme::load($this->path, 'teal', 'high')['dark']['surface'])->toBe('#000000') + // The level names no surface in light, so the standard one stands. + ->and(Scheme::light($this->path, 'teal', 'high')['surface'])->toBe('#fafafa') + ->and(Scheme::load($this->path, 'teal', 'medium')['light']['primary'])->toBe('#332f8a') + ->and(Scheme::load($this->path, 'teal')['light']['primary'])->toBe('#00897b') + // A level nobody generated, and a name that is not one, are the standard scheme. + ->and(Scheme::load($this->path, 'teal', 'extreme')['light']['primary'])->toBe('#00897b') + ->and(Scheme::profiles($this->path, 'high')['rose']['light']['primary'])->toBe('#000000') + ->and(Scheme::profiles($this->path)['rose']['light']['primary'])->toBe('#c2185b'); +}); + +it('draws a high contrast level from the package default for a scheme file without one', function () { + File::put($this->path, json_encode(['light' => ['primary' => '#123456'], 'dark' => ['primary' => '#abcdef']])); + + $package = json_decode(File::get(__DIR__.'/../../resources/css/tokens/scheme.json'), true); + + expect(Scheme::light($this->path, null, 'high')['primary'])->toBe('#123456') + ->and(Scheme::light($this->path, null, 'high')['surface'])->toBe($package['contrast']['high']['light']['surface']) + ->and(Scheme::light($this->path)['surface'])->toBe($package['light']['surface']); +}); + it('has no profile for a single scheme, and loads it as before', function () { File::put($this->path, json_encode(['light' => ['primary' => '#123456'], 'dark' => ['primary' => '#abcdef']])); Scheme::resolveProfileUsing(fn (): string => 'teal'); diff --git a/tests/Feature/TokensTest.php b/tests/Feature/TokensTest.php index 4e0c2ade..2516d49b 100644 --- a/tests/Feature/TokensTest.php +++ b/tests/Feature/TokensTest.php @@ -38,6 +38,23 @@ it('ships a default scheme that declares every role in both themes', function () } }); +it('ships M3\'s medium and high contrast levels beside the standard one', function () { + $scheme = json_decode(File::get(packageCss('tokens/scheme.json')), true); + $css = File::get(packageCss('tokens/scheme.css')); + + foreach (['medium', 'high'] as $level) { + foreach (['light', 'dark'] as $theme) { + $declared = declarations($css, "[data-contrast='{$level}'] [data-theme='{$theme}'] {"); + + expect(array_keys($declared))->toEqual(array_map(fn (string $role): string => "--md-sys-color-{$role}", array_keys($scheme['light']))); + + foreach ($scheme['contrast'][$level][$theme] as $role => $hex) { + expect($declared["--md-sys-color-{$role}"])->toBe($hex); + } + } + } +}); + it('turns every role into a Tailwind colour', function () { $roles = array_keys(json_decode(File::get(packageCss('tokens/scheme.json')), true)['light']); $theme = File::get(packageCss('tokens/theme.css')); @@ -58,9 +75,11 @@ it('resolves colour utilities on the element, so a nested data-theme repaints th ->not->toMatch('/--[\w-]+:\s*#/'); }); -it('leaves the choice of theme to the head script, never to a media query', function () { +it('leaves the choice of theme and of contrast to the head script, never to a media query', function () { foreach (File::allFiles(packageCss()) as $file) { - expect($file->getContents())->not->toContain('prefers-color-scheme'); + expect($file->getContents()) + ->not->toContain('prefers-color-scheme') + ->not->toContain('prefers-contrast'); } }); diff --git a/workbench/resources/css/material-scheme.css b/workbench/resources/css/material-scheme.css index 84e0a348..33cb76df 100644 --- a/workbench/resources/css/material-scheme.css +++ b/workbench/resources/css/material-scheme.css @@ -11,8 +11,8 @@ * rose #c2185b, vibrant * * Regenerate rather than editing a value: every pair here (a role and its on-role) carries - * M3's contrast guarantee only as generated. The head script sets data-theme and data-scheme - * before the first paint. + * M3's contrast guarantee only as generated. The head script sets data-theme, data-scheme + * and data-contrast before the first paint. */ :root, @@ -68,22 +68,22 @@ --md-sys-color-on-error: #fff7f7; --md-sys-color-error-container: #f97386; --md-sys-color-on-error-container: #6e0523; - --md-sys-color-success: #006c45; - --md-sys-color-on-success: #ffffff; + --md-sys-color-success: #006d46; + --md-sys-color-on-success: #e7ffed; --md-sys-color-success-container: #86f9bc; - --md-sys-color-on-success-container: #002112; - --md-sys-color-warning: #7c5800; - --md-sys-color-on-warning: #ffffff; - --md-sys-color-warning-container: #ffdea6; - --md-sys-color-on-warning-container: #271900; - --md-sys-color-info: #005ac4; - --md-sys-color-on-info: #ffffff; - --md-sys-color-info-container: #d8e2ff; - --md-sys-color-on-info-container: #001a42; + --md-sys-color-on-success-container: #00734a; + --md-sys-color-warning: #7c5900; + --md-sys-color-on-warning: #fff8f1; + --md-sys-color-warning-container: #fab925; + --md-sys-color-on-warning-container: #6a4b00; + --md-sys-color-info: #005bc5; + --md-sys-color-on-info: #f9f8ff; + --md-sys-color-info-container: #1c7afc; + --md-sys-color-on-info-container: #001435; --md-sys-color-inverse-error: #f97386; - --md-sys-color-inverse-success: #69dca1; - --md-sys-color-inverse-warning: #fdbb28; - --md-sys-color-inverse-info: #aec6ff; + --md-sys-color-inverse-success: #3bb27b; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #699cff; } [data-theme='dark'] { @@ -138,22 +138,308 @@ --md-sys-color-on-error: #490013; --md-sys-color-error-container: #871c34; --md-sys-color-on-error-container: #ff97a3; - --md-sys-color-success: #69dca1; - --md-sys-color-on-success: #003822; - --md-sys-color-success-container: #005233; - --md-sys-color-on-success-container: #86f9bc; - --md-sys-color-warning: #fdbb28; - --md-sys-color-on-warning: #412d00; - --md-sys-color-warning-container: #5e4200; - --md-sys-color-on-warning-container: #ffdea6; - --md-sys-color-info: #aec6ff; - --md-sys-color-on-info: #002e6a; - --md-sys-color-info-container: #004396; - --md-sys-color-on-info-container: #d8e2ff; + --md-sys-color-success: #3bb27b; + --md-sys-color-on-success: #002615; + --md-sys-color-success-container: #059460; + --md-sys-color-on-success-container: #001e10; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #4e3600; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #593f00; + --md-sys-color-info: #699cff; + --md-sys-color-on-info: #001e4b; + --md-sys-color-info-container: #0c74f6; + --md-sys-color-on-info-container: #000a23; --md-sys-color-inverse-error: #a8364b; - --md-sys-color-inverse-success: #006c45; - --md-sys-color-inverse-warning: #7c5800; - --md-sys-color-inverse-info: #005ac4; + --md-sys-color-inverse-success: #006d46; + --md-sys-color-inverse-warning: #7c5900; + --md-sys-color-inverse-info: #005bc5; +} + +[data-contrast='medium'], +[data-contrast='medium'][data-theme='light'], +[data-contrast='medium'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #fdf7fe; + --md-sys-color-on-background: #25232b; + --md-sys-color-surface: #fdf7fe; + --md-sys-color-surface-dim: #ded8e4; + --md-sys-color-surface-bright: #fdf7fe; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #f8f1fa; + --md-sys-color-surface-container: #f2ecf5; + --md-sys-color-surface-container-high: #ece6f0; + --md-sys-color-surface-container-highest: #e7e0ec; + --md-sys-color-on-surface: #25232b; + --md-sys-color-on-surface-variant: #45414b; + --md-sys-color-outline: #615d68; + --md-sys-color-outline-variant: #7d7983; + --md-sys-color-inverse-surface: #0f0d12; + --md-sys-color-inverse-on-surface: #c8c3c9; + --md-sys-color-primary: #483b6b; + --md-sys-color-primary-dim: #3c305f; + --md-sys-color-on-primary: #e1d3ff; + --md-sys-color-primary-container: #7b6da0; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #7b6da0; + --md-sys-color-primary-fixed-dim: #6e6093; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #d4c3fd; + --md-sys-color-secondary: #464054; + --md-sys-color-secondary-dim: #3a3548; + --md-sys-color-on-secondary: #dfd5ef; + --md-sys-color-secondary-container: #787187; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #787187; + --md-sys-color-secondary-fixed-dim: #6c657b; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #5c3653; + --md-sys-color-tertiary-dim: #502b47; + --md-sys-color-on-tertiary: #ffcaee; + --md-sys-color-tertiary-container: #936787; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #936787; + --md-sys-color-tertiary-fixed-dim: #855b7a; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #821830; + --md-sys-color-error-dim: #6b0221; + --md-sys-color-on-error: #ffcdd1; + --md-sys-color-error-container: #c44b5f; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #004d30; + --md-sys-color-on-success: #7df0b3; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #593e00; + --md-sys-color-on-warning: #ffd385; + --md-sys-color-warning-container: #986d00; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #003f8e; + --md-sys-color-on-info: #cbd9ff; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ff9da8; + --md-sys-color-inverse-success: #5ace94; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #98b8ff; +} + +[data-contrast='medium'][data-theme='dark'], +[data-contrast='medium'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #0f0d12; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #0f0d12; + --md-sys-color-surface-dim: #0f0d12; + --md-sys-color-surface-bright: #2e2b34; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #141218; + --md-sys-color-surface-container: #1b181f; + --md-sys-color-surface-container-high: #211e26; + --md-sys-color-surface-container-highest: #27242d; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #bcb6c2; + --md-sys-color-outline: #96919c; + --md-sys-color-outline-variant: #78737e; + --md-sys-color-inverse-surface: #fdf7fe; + --md-sys-color-inverse-on-surface: #39373c; + --md-sys-color-primary: #cdc0ec; + --md-sys-color-primary-dim: #bfb2de; + --md-sys-color-on-primary: #3a3054; + --md-sys-color-primary-container: #7a6f96; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #ded0fe; + --md-sys-color-primary-fixed-dim: #d0c3ef; + --md-sys-color-on-primary-fixed: #180e30; + --md-sys-color-on-primary-fixed-variant: #3c3256; + --md-sys-color-inverse-primary: #5a4f75; + --md-sys-color-secondary: #cbc2db; + --md-sys-color-secondary-dim: #beb5cd; + --md-sys-color-on-secondary: #393347; + --md-sys-color-secondary-container: #787187; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #e8def8; + --md-sys-color-secondary-fixed-dim: #dad0ea; + --md-sys-color-on-secondary-fixed: #221d2f; + --md-sys-color-on-secondary-fixed-variant: #423c50; + --md-sys-color-tertiary: #ffcfef; + --md-sys-color-tertiary-dim: #f4bfe3; + --md-sys-color-on-tertiary: #5e3855; + --md-sys-color-tertiary-container: #f4bfe3; + --md-sys-color-on-tertiary-container: #542f4c; + --md-sys-color-tertiary-fixed: #f4bfe3; + --md-sys-color-tertiary-fixed-dim: #e5b2d5; + --md-sys-color-on-tertiary-fixed: #180015; + --md-sys-color-on-tertiary-fixed-variant: #4a2642; + --md-sys-color-error: #ff9da8; + --md-sys-color-error-dim: #ff8695; + --md-sys-color-on-error: #5f001c; + --md-sys-color-error-container: #c44b5f; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #5ace94; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #412d00; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #332200; + --md-sys-color-info: #98b8ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #821830; + --md-sys-color-inverse-success: #004d30; + --md-sys-color-inverse-warning: #593e00; + --md-sys-color-inverse-info: #003f8e; +} + +[data-contrast='high'], +[data-contrast='high'][data-theme='light'], +[data-contrast='high'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #fdf7fe; + --md-sys-color-on-background: #000000; + --md-sys-color-surface: #fdf7fe; + --md-sys-color-surface-dim: #ded8e4; + --md-sys-color-surface-bright: #fdf7fe; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #f8f1fa; + --md-sys-color-surface-container: #f2ecf5; + --md-sys-color-surface-container-high: #ece6f0; + --md-sys-color-surface-container-highest: #e7e0ec; + --md-sys-color-on-surface: #000000; + --md-sys-color-on-surface-variant: #25232b; + --md-sys-color-outline: #45414b; + --md-sys-color-outline-variant: #54505a; + --md-sys-color-inverse-surface: #0f0d12; + --md-sys-color-inverse-on-surface: #ffffff; + --md-sys-color-primary: #281b49; + --md-sys-color-primary-dim: #1e103f; + --md-sys-color-on-primary: #e1d3ff; + --md-sys-color-primary-container: #584a7b; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #584a7b; + --md-sys-color-primary-fixed-dim: #4c3f6f; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #d4c3fd; + --md-sys-color-secondary: #262134; + --md-sys-color-secondary-dim: #1c1729; + --md-sys-color-on-secondary: #dfd6ef; + --md-sys-color-secondary-container: #554f64; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #554f64; + --md-sys-color-secondary-fixed-dim: #494358; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #391733; + --md-sys-color-tertiary-dim: #2e0d28; + --md-sys-color-on-tertiary: #ffcbee; + --md-sys-color-tertiary-container: #6d4563; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #6d4563; + --md-sys-color-tertiary-fixed-dim: #603a57; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #500016; + --md-sys-color-error-dim: #3d000f; + --md-sys-color-on-error: #ffced2; + --md-sys-color-error-container: #97283e; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #002a18; + --md-sys-color-on-success: #7df0b4; + --md-sys-color-success-container: #005f3c; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #312100; + --md-sys-color-on-warning: #ffd486; + --md-sys-color-warning-container: #6c4d00; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #002252; + --md-sys-color-on-info: #ccdaff; + --md-sys-color-info-container: #004eac; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ffdddf; + --md-sys-color-inverse-success: #89fcbf; + --md-sys-color-inverse-warning: #ffe2b1; + --md-sys-color-inverse-info: #dde5ff; +} + +[data-contrast='high'][data-theme='dark'], +[data-contrast='high'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #0f0d12; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #0f0d12; + --md-sys-color-surface-dim: #0f0d12; + --md-sys-color-surface-bright: #2e2b34; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #141218; + --md-sys-color-surface-container: #1b181f; + --md-sys-color-surface-container-high: #211e26; + --md-sys-color-surface-container-highest: #27242d; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #eae3ef; + --md-sys-color-outline: #bcb6c2; + --md-sys-color-outline-variant: #a7a1ad; + --md-sys-color-inverse-surface: #fdf7fe; + --md-sys-color-inverse-on-surface: #000000; + --md-sys-color-primary: #ebe1ff; + --md-sys-color-primary-dim: #ded0fe; + --md-sys-color-on-primary: #302649; + --md-sys-color-primary-container: #aa9dc8; + --md-sys-color-on-primary-container: #000000; + --md-sys-color-primary-fixed: #ded0fe; + --md-sys-color-primary-fixed-dim: #d0c3ef; + --md-sys-color-on-primary-fixed: #000000; + --md-sys-color-on-primary-fixed-variant: #180e30; + --md-sys-color-inverse-primary: #3c3256; + --md-sys-color-secondary: #ebe1fb; + --md-sys-color-secondary-dim: #ddd3ed; + --md-sys-color-on-secondary: #2e293c; + --md-sys-color-secondary-container: #a8a0b8; + --md-sys-color-on-secondary-container: #000000; + --md-sys-color-secondary-fixed: #e8def8; + --md-sys-color-secondary-fixed-dim: #dad0ea; + --md-sys-color-on-secondary-fixed: #000000; + --md-sys-color-on-secondary-fixed-variant: #221d2f; + --md-sys-color-tertiary: #ffdbf2; + --md-sys-color-tertiary-dim: #fac5e9; + --md-sys-color-on-tertiary: #43203b; + --md-sys-color-tertiary-container: #f4bfe3; + --md-sys-color-on-tertiary-container: #2e0e29; + --md-sys-color-tertiary-fixed: #f4bfe3; + --md-sys-color-tertiary-fixed-dim: #e5b2d5; + --md-sys-color-on-tertiary-fixed: #000000; + --md-sys-color-on-tertiary-fixed-variant: #180015; + --md-sys-color-error: #ffdddf; + --md-sys-color-error-dim: #ffc7cb; + --md-sys-color-on-error: #5f001c; + --md-sys-color-error-container: #ff798c; + --md-sys-color-on-error-container: #000000; + --md-sys-color-success: #89fcbf; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #42b880; + --md-sys-color-on-success-container: #000000; + --md-sys-color-warning: #ffe2b1; + --md-sys-color-on-warning: #3c2900; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #000000; + --md-sys-color-info: #dde5ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #74a2ff; + --md-sys-color-on-info-container: #000000; + --md-sys-color-inverse-error: #500016; + --md-sys-color-inverse-success: #002a18; + --md-sys-color-inverse-warning: #312100; + --md-sys-color-inverse-info: #002252; } [data-scheme='baseline'], @@ -210,22 +496,22 @@ --md-sys-color-on-error: #fff7f7; --md-sys-color-error-container: #f97386; --md-sys-color-on-error-container: #6e0523; - --md-sys-color-success: #006c45; - --md-sys-color-on-success: #ffffff; + --md-sys-color-success: #006d46; + --md-sys-color-on-success: #e7ffed; --md-sys-color-success-container: #86f9bc; - --md-sys-color-on-success-container: #002112; - --md-sys-color-warning: #7c5800; - --md-sys-color-on-warning: #ffffff; - --md-sys-color-warning-container: #ffdea6; - --md-sys-color-on-warning-container: #271900; - --md-sys-color-info: #005ac4; - --md-sys-color-on-info: #ffffff; - --md-sys-color-info-container: #d8e2ff; - --md-sys-color-on-info-container: #001a42; + --md-sys-color-on-success-container: #00734a; + --md-sys-color-warning: #7c5900; + --md-sys-color-on-warning: #fff8f1; + --md-sys-color-warning-container: #fab925; + --md-sys-color-on-warning-container: #6a4b00; + --md-sys-color-info: #005bc5; + --md-sys-color-on-info: #f9f8ff; + --md-sys-color-info-container: #1c7afc; + --md-sys-color-on-info-container: #001435; --md-sys-color-inverse-error: #f97386; - --md-sys-color-inverse-success: #69dca1; - --md-sys-color-inverse-warning: #fdbb28; - --md-sys-color-inverse-info: #aec6ff; + --md-sys-color-inverse-success: #3bb27b; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #699cff; } [data-scheme='baseline'][data-theme='dark'], @@ -281,22 +567,308 @@ --md-sys-color-on-error: #490013; --md-sys-color-error-container: #871c34; --md-sys-color-on-error-container: #ff97a3; - --md-sys-color-success: #69dca1; - --md-sys-color-on-success: #003822; - --md-sys-color-success-container: #005233; - --md-sys-color-on-success-container: #86f9bc; - --md-sys-color-warning: #fdbb28; - --md-sys-color-on-warning: #412d00; - --md-sys-color-warning-container: #5e4200; - --md-sys-color-on-warning-container: #ffdea6; - --md-sys-color-info: #aec6ff; - --md-sys-color-on-info: #002e6a; - --md-sys-color-info-container: #004396; - --md-sys-color-on-info-container: #d8e2ff; + --md-sys-color-success: #3bb27b; + --md-sys-color-on-success: #002615; + --md-sys-color-success-container: #059460; + --md-sys-color-on-success-container: #001e10; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #4e3600; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #593f00; + --md-sys-color-info: #699cff; + --md-sys-color-on-info: #001e4b; + --md-sys-color-info-container: #0c74f6; + --md-sys-color-on-info-container: #000a23; --md-sys-color-inverse-error: #a8364b; - --md-sys-color-inverse-success: #006c45; - --md-sys-color-inverse-warning: #7c5800; - --md-sys-color-inverse-info: #005ac4; + --md-sys-color-inverse-success: #006d46; + --md-sys-color-inverse-warning: #7c5900; + --md-sys-color-inverse-info: #005bc5; +} + +[data-scheme='baseline'][data-contrast='medium'], +[data-scheme='baseline'][data-contrast='medium'][data-theme='light'], +[data-scheme='baseline'][data-contrast='medium'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #fdf7fe; + --md-sys-color-on-background: #25232b; + --md-sys-color-surface: #fdf7fe; + --md-sys-color-surface-dim: #ded8e4; + --md-sys-color-surface-bright: #fdf7fe; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #f8f1fa; + --md-sys-color-surface-container: #f2ecf5; + --md-sys-color-surface-container-high: #ece6f0; + --md-sys-color-surface-container-highest: #e7e0ec; + --md-sys-color-on-surface: #25232b; + --md-sys-color-on-surface-variant: #45414b; + --md-sys-color-outline: #615d68; + --md-sys-color-outline-variant: #7d7983; + --md-sys-color-inverse-surface: #0f0d12; + --md-sys-color-inverse-on-surface: #c8c3c9; + --md-sys-color-primary: #483b6b; + --md-sys-color-primary-dim: #3c305f; + --md-sys-color-on-primary: #e1d3ff; + --md-sys-color-primary-container: #7b6da0; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #7b6da0; + --md-sys-color-primary-fixed-dim: #6e6093; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #d4c3fd; + --md-sys-color-secondary: #464054; + --md-sys-color-secondary-dim: #3a3548; + --md-sys-color-on-secondary: #dfd5ef; + --md-sys-color-secondary-container: #787187; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #787187; + --md-sys-color-secondary-fixed-dim: #6c657b; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #5c3653; + --md-sys-color-tertiary-dim: #502b47; + --md-sys-color-on-tertiary: #ffcaee; + --md-sys-color-tertiary-container: #936787; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #936787; + --md-sys-color-tertiary-fixed-dim: #855b7a; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #821830; + --md-sys-color-error-dim: #6b0221; + --md-sys-color-on-error: #ffcdd1; + --md-sys-color-error-container: #c44b5f; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #004d30; + --md-sys-color-on-success: #7df0b3; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #593e00; + --md-sys-color-on-warning: #ffd385; + --md-sys-color-warning-container: #986d00; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #003f8e; + --md-sys-color-on-info: #cbd9ff; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ff9da8; + --md-sys-color-inverse-success: #5ace94; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #98b8ff; +} + +[data-scheme='baseline'][data-contrast='medium'][data-theme='dark'], +[data-scheme='baseline'][data-contrast='medium'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #0f0d12; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #0f0d12; + --md-sys-color-surface-dim: #0f0d12; + --md-sys-color-surface-bright: #2e2b34; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #141218; + --md-sys-color-surface-container: #1b181f; + --md-sys-color-surface-container-high: #211e26; + --md-sys-color-surface-container-highest: #27242d; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #bcb6c2; + --md-sys-color-outline: #96919c; + --md-sys-color-outline-variant: #78737e; + --md-sys-color-inverse-surface: #fdf7fe; + --md-sys-color-inverse-on-surface: #39373c; + --md-sys-color-primary: #cdc0ec; + --md-sys-color-primary-dim: #bfb2de; + --md-sys-color-on-primary: #3a3054; + --md-sys-color-primary-container: #7a6f96; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #ded0fe; + --md-sys-color-primary-fixed-dim: #d0c3ef; + --md-sys-color-on-primary-fixed: #180e30; + --md-sys-color-on-primary-fixed-variant: #3c3256; + --md-sys-color-inverse-primary: #5a4f75; + --md-sys-color-secondary: #cbc2db; + --md-sys-color-secondary-dim: #beb5cd; + --md-sys-color-on-secondary: #393347; + --md-sys-color-secondary-container: #787187; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #e8def8; + --md-sys-color-secondary-fixed-dim: #dad0ea; + --md-sys-color-on-secondary-fixed: #221d2f; + --md-sys-color-on-secondary-fixed-variant: #423c50; + --md-sys-color-tertiary: #ffcfef; + --md-sys-color-tertiary-dim: #f4bfe3; + --md-sys-color-on-tertiary: #5e3855; + --md-sys-color-tertiary-container: #f4bfe3; + --md-sys-color-on-tertiary-container: #542f4c; + --md-sys-color-tertiary-fixed: #f4bfe3; + --md-sys-color-tertiary-fixed-dim: #e5b2d5; + --md-sys-color-on-tertiary-fixed: #180015; + --md-sys-color-on-tertiary-fixed-variant: #4a2642; + --md-sys-color-error: #ff9da8; + --md-sys-color-error-dim: #ff8695; + --md-sys-color-on-error: #5f001c; + --md-sys-color-error-container: #c44b5f; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #5ace94; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #412d00; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #332200; + --md-sys-color-info: #98b8ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #821830; + --md-sys-color-inverse-success: #004d30; + --md-sys-color-inverse-warning: #593e00; + --md-sys-color-inverse-info: #003f8e; +} + +[data-scheme='baseline'][data-contrast='high'], +[data-scheme='baseline'][data-contrast='high'][data-theme='light'], +[data-scheme='baseline'][data-contrast='high'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #fdf7fe; + --md-sys-color-on-background: #000000; + --md-sys-color-surface: #fdf7fe; + --md-sys-color-surface-dim: #ded8e4; + --md-sys-color-surface-bright: #fdf7fe; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #f8f1fa; + --md-sys-color-surface-container: #f2ecf5; + --md-sys-color-surface-container-high: #ece6f0; + --md-sys-color-surface-container-highest: #e7e0ec; + --md-sys-color-on-surface: #000000; + --md-sys-color-on-surface-variant: #25232b; + --md-sys-color-outline: #45414b; + --md-sys-color-outline-variant: #54505a; + --md-sys-color-inverse-surface: #0f0d12; + --md-sys-color-inverse-on-surface: #ffffff; + --md-sys-color-primary: #281b49; + --md-sys-color-primary-dim: #1e103f; + --md-sys-color-on-primary: #e1d3ff; + --md-sys-color-primary-container: #584a7b; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #584a7b; + --md-sys-color-primary-fixed-dim: #4c3f6f; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #d4c3fd; + --md-sys-color-secondary: #262134; + --md-sys-color-secondary-dim: #1c1729; + --md-sys-color-on-secondary: #dfd6ef; + --md-sys-color-secondary-container: #554f64; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #554f64; + --md-sys-color-secondary-fixed-dim: #494358; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #391733; + --md-sys-color-tertiary-dim: #2e0d28; + --md-sys-color-on-tertiary: #ffcbee; + --md-sys-color-tertiary-container: #6d4563; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #6d4563; + --md-sys-color-tertiary-fixed-dim: #603a57; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #500016; + --md-sys-color-error-dim: #3d000f; + --md-sys-color-on-error: #ffced2; + --md-sys-color-error-container: #97283e; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #002a18; + --md-sys-color-on-success: #7df0b4; + --md-sys-color-success-container: #005f3c; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #312100; + --md-sys-color-on-warning: #ffd486; + --md-sys-color-warning-container: #6c4d00; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #002252; + --md-sys-color-on-info: #ccdaff; + --md-sys-color-info-container: #004eac; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ffdddf; + --md-sys-color-inverse-success: #89fcbf; + --md-sys-color-inverse-warning: #ffe2b1; + --md-sys-color-inverse-info: #dde5ff; +} + +[data-scheme='baseline'][data-contrast='high'][data-theme='dark'], +[data-scheme='baseline'][data-contrast='high'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #0f0d12; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #0f0d12; + --md-sys-color-surface-dim: #0f0d12; + --md-sys-color-surface-bright: #2e2b34; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #141218; + --md-sys-color-surface-container: #1b181f; + --md-sys-color-surface-container-high: #211e26; + --md-sys-color-surface-container-highest: #27242d; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #eae3ef; + --md-sys-color-outline: #bcb6c2; + --md-sys-color-outline-variant: #a7a1ad; + --md-sys-color-inverse-surface: #fdf7fe; + --md-sys-color-inverse-on-surface: #000000; + --md-sys-color-primary: #ebe1ff; + --md-sys-color-primary-dim: #ded0fe; + --md-sys-color-on-primary: #302649; + --md-sys-color-primary-container: #aa9dc8; + --md-sys-color-on-primary-container: #000000; + --md-sys-color-primary-fixed: #ded0fe; + --md-sys-color-primary-fixed-dim: #d0c3ef; + --md-sys-color-on-primary-fixed: #000000; + --md-sys-color-on-primary-fixed-variant: #180e30; + --md-sys-color-inverse-primary: #3c3256; + --md-sys-color-secondary: #ebe1fb; + --md-sys-color-secondary-dim: #ddd3ed; + --md-sys-color-on-secondary: #2e293c; + --md-sys-color-secondary-container: #a8a0b8; + --md-sys-color-on-secondary-container: #000000; + --md-sys-color-secondary-fixed: #e8def8; + --md-sys-color-secondary-fixed-dim: #dad0ea; + --md-sys-color-on-secondary-fixed: #000000; + --md-sys-color-on-secondary-fixed-variant: #221d2f; + --md-sys-color-tertiary: #ffdbf2; + --md-sys-color-tertiary-dim: #fac5e9; + --md-sys-color-on-tertiary: #43203b; + --md-sys-color-tertiary-container: #f4bfe3; + --md-sys-color-on-tertiary-container: #2e0e29; + --md-sys-color-tertiary-fixed: #f4bfe3; + --md-sys-color-tertiary-fixed-dim: #e5b2d5; + --md-sys-color-on-tertiary-fixed: #000000; + --md-sys-color-on-tertiary-fixed-variant: #180015; + --md-sys-color-error: #ffdddf; + --md-sys-color-error-dim: #ffc7cb; + --md-sys-color-on-error: #5f001c; + --md-sys-color-error-container: #ff798c; + --md-sys-color-on-error-container: #000000; + --md-sys-color-success: #89fcbf; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #42b880; + --md-sys-color-on-success-container: #000000; + --md-sys-color-warning: #ffe2b1; + --md-sys-color-on-warning: #3c2900; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #000000; + --md-sys-color-info: #dde5ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #74a2ff; + --md-sys-color-on-info-container: #000000; + --md-sys-color-inverse-error: #500016; + --md-sys-color-inverse-success: #002a18; + --md-sys-color-inverse-warning: #312100; + --md-sys-color-inverse-info: #002252; } [data-scheme='teal'], @@ -353,22 +925,22 @@ --md-sys-color-on-error: #ffefee; --md-sys-color-error-container: #fb5151; --md-sys-color-on-error-container: #570008; - --md-sys-color-success: #006c45; - --md-sys-color-on-success: #ffffff; + --md-sys-color-success: #006943; + --md-sys-color-on-success: #caffdd; --md-sys-color-success-container: #86f9bc; - --md-sys-color-on-success-container: #002112; - --md-sys-color-warning: #7c5800; - --md-sys-color-on-warning: #ffffff; - --md-sys-color-warning-container: #ffdea6; - --md-sys-color-on-warning-container: #271900; - --md-sys-color-info: #005ac4; - --md-sys-color-on-info: #ffffff; - --md-sys-color-info-container: #d8e2ff; - --md-sys-color-on-info-container: #001a42; + --md-sys-color-on-success-container: #00734a; + --md-sys-color-warning: #785500; + --md-sys-color-on-warning: #fff1dd; + --md-sys-color-warning-container: #fab925; + --md-sys-color-on-warning-container: #6a4b00; + --md-sys-color-info: #0057be; + --md-sys-color-on-info: #f0f2ff; + --md-sys-color-info-container: #1c7afc; + --md-sys-color-on-info-container: #001435; --md-sys-color-inverse-error: #ff716c; - --md-sys-color-inverse-success: #69dca1; - --md-sys-color-inverse-warning: #fdbb28; - --md-sys-color-inverse-info: #aec6ff; + --md-sys-color-inverse-success: #3bb27b; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #699cff; } [data-scheme='teal'][data-theme='dark'], @@ -424,22 +996,308 @@ --md-sys-color-on-error: #490006; --md-sys-color-error-container: #9f0519; --md-sys-color-on-error-container: #ffa8a3; - --md-sys-color-success: #69dca1; - --md-sys-color-on-success: #003822; - --md-sys-color-success-container: #005233; - --md-sys-color-on-success-container: #86f9bc; - --md-sys-color-warning: #fdbb28; - --md-sys-color-on-warning: #412d00; - --md-sys-color-warning-container: #5e4200; - --md-sys-color-on-warning-container: #ffdea6; - --md-sys-color-info: #aec6ff; - --md-sys-color-on-info: #002e6a; - --md-sys-color-info-container: #004396; - --md-sys-color-on-info-container: #d8e2ff; + --md-sys-color-success: #3bb27b; + --md-sys-color-on-success: #002615; + --md-sys-color-success-container: #059460; + --md-sys-color-on-success-container: #001e10; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #4e3600; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #593f00; + --md-sys-color-info: #699cff; + --md-sys-color-on-info: #001e4b; + --md-sys-color-info-container: #0c74f6; + --md-sys-color-on-info-container: #000a23; --md-sys-color-inverse-error: #b31b25; - --md-sys-color-inverse-success: #006c45; - --md-sys-color-inverse-warning: #7c5800; - --md-sys-color-inverse-info: #005ac4; + --md-sys-color-inverse-success: #006943; + --md-sys-color-inverse-warning: #785500; + --md-sys-color-inverse-info: #0057be; +} + +[data-scheme='teal'][data-contrast='medium'], +[data-scheme='teal'][data-contrast='medium'][data-theme='light'], +[data-scheme='teal'][data-contrast='medium'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #d3fffd; + --md-sys-color-on-background: #002423; + --md-sys-color-surface: #d3fffd; + --md-sys-color-surface-dim: #87e4e1; + --md-sys-color-surface-bright: #d3fffd; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #bafdfa; + --md-sys-color-surface-container: #adf5f2; + --md-sys-color-surface-container-high: #a2f0ed; + --md-sys-color-surface-container-highest: #96ece8; + --md-sys-color-on-surface: #002423; + --md-sys-color-on-surface-variant: #004746; + --md-sys-color-outline: #296463; + --md-sys-color-outline-variant: #46807e; + --md-sys-color-inverse-surface: #001111; + --md-sys-color-inverse-on-surface: #95cfcd; + --md-sys-color-primary: #004840; + --md-sys-color-primary-dim: #003c35; + --md-sys-color-on-primary: #00eed6; + --md-sys-color-primary-container: #008376; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #008376; + --md-sys-color-primary-fixed-dim: #007569; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #00fee5; + --md-sys-color-secondary: #004746; + --md-sys-color-secondary-dim: #003b3a; + --md-sys-color-on-secondary: #0eece8; + --md-sys-color-secondary-container: #008280; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #008280; + --md-sys-color-secondary-fixed-dim: #007573; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #00445e; + --md-sys-color-tertiary-dim: #00394f; + --md-sys-color-on-tertiary: #a1dcff; + --md-sys-color-tertiary-container: #007da9; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #007da9; + --md-sys-color-tertiary-fixed-dim: #007098; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #850012; + --md-sys-color-error-dim: #70000d; + --md-sys-color-on-error: #ffc7c2; + --md-sys-color-error-container: #d7383b; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #00492d; + --md-sys-color-on-success: #77eaae; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #543b00; + --md-sys-color-on-warning: #ffcd6d; + --md-sys-color-warning-container: #986d00; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #003c87; + --md-sys-color-on-info: #c3d4ff; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ff9f99; + --md-sys-color-inverse-success: #5ace94; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #98b8ff; +} + +[data-scheme='teal'][data-contrast='medium'][data-theme='dark'], +[data-scheme='teal'][data-contrast='medium'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #001111; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #001111; + --md-sys-color-surface-dim: #001111; + --md-sys-color-surface-bright: #003231; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #001716; + --md-sys-color-surface-container: #001e1d; + --md-sys-color-surface-container-high: #002424; + --md-sys-color-surface-container-highest: #002b2a; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #89c3c1; + --md-sys-color-outline: #649d9b; + --md-sys-color-outline-variant: #457f7d; + --md-sys-color-inverse-surface: #e3fffd; + --md-sys-color-inverse-on-surface: #003f3e; + --md-sys-color-primary: #b4fff1; + --md-sys-color-primary-dim: #00fee5; + --md-sys-color-on-primary: #005b51; + --md-sys-color-primary-container: #00fee5; + --md-sys-color-on-primary-container: #005249; + --md-sys-color-primary-fixed: #00f7df; + --md-sys-color-primary-fixed-dim: #00e8d1; + --md-sys-color-on-primary-fixed: #001f1b; + --md-sys-color-on-primary-fixed-variant: #00443c; + --md-sys-color-inverse-primary: #006056; + --md-sys-color-secondary: #38fbf7; + --md-sys-color-secondary-dim: #10ece8; + --md-sys-color-on-secondary: #005150; + --md-sys-color-secondary-container: #008280; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #38fbf7; + --md-sys-color-secondary-fixed-dim: #10ece8; + --md-sys-color-on-secondary-fixed: #002423; + --md-sys-color-on-secondary-fixed-variant: #004746; + --md-sys-color-tertiary: #68ccff; + --md-sys-color-tertiary-dim: #20c0ff; + --md-sys-color-on-tertiary: #00374c; + --md-sys-color-tertiary-container: #20c0ff; + --md-sys-color-on-tertiary-container: #002b3d; + --md-sys-color-tertiary-fixed: #20c0ff; + --md-sys-color-tertiary-fixed-dim: #00b2ee; + --md-sys-color-on-tertiary-fixed: #000000; + --md-sys-color-on-tertiary-fixed-variant: #001e2b; + --md-sys-color-error: #ff9f99; + --md-sys-color-error-dim: #ff8882; + --md-sys-color-on-error: #60000a; + --md-sys-color-error-container: #d7383b; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #5ace94; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #412d00; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #332200; + --md-sys-color-info: #98b8ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #850012; + --md-sys-color-inverse-success: #00492d; + --md-sys-color-inverse-warning: #543b00; + --md-sys-color-inverse-info: #003c87; +} + +[data-scheme='teal'][data-contrast='high'], +[data-scheme='teal'][data-contrast='high'][data-theme='light'], +[data-scheme='teal'][data-contrast='high'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #d3fffd; + --md-sys-color-on-background: #000000; + --md-sys-color-surface: #d3fffd; + --md-sys-color-surface-dim: #87e4e1; + --md-sys-color-surface-bright: #d3fffd; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #bafdfa; + --md-sys-color-surface-container: #adf5f2; + --md-sys-color-surface-container-high: #a2f0ed; + --md-sys-color-surface-container-highest: #96ece8; + --md-sys-color-on-surface: #000000; + --md-sys-color-on-surface-variant: #002423; + --md-sys-color-outline: #004746; + --md-sys-color-outline-variant: #185756; + --md-sys-color-inverse-surface: #001111; + --md-sys-color-inverse-on-surface: #ffffff; + --md-sys-color-primary: #002420; + --md-sys-color-primary-dim: #001916; + --md-sys-color-on-primary: #00eed7; + --md-sys-color-primary-container: #00594f; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #00594f; + --md-sys-color-primary-fixed-dim: #004c44; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #00fee5; + --md-sys-color-secondary: #002423; + --md-sys-color-secondary-dim: #001918; + --md-sys-color-on-secondary: #11ece9; + --md-sys-color-secondary-container: #005857; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #005857; + --md-sys-color-secondary-fixed-dim: #004c4a; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #002232; + --md-sys-color-tertiary-dim: #001824; + --md-sys-color-on-tertiary: #a2dcff; + --md-sys-color-tertiary-container: #005574; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #005574; + --md-sys-color-tertiary-fixed-dim: #004864; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #480005; + --md-sys-color-error-dim: #350003; + --md-sys-color-on-error: #ffc7c3; + --md-sys-color-error-container: #a0071a; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #002515; + --md-sys-color-on-success: #78eaaf; + --md-sys-color-success-container: #005b39; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #2c1d00; + --md-sys-color-on-warning: #ffcd6f; + --md-sys-color-warning-container: #684900; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #001e4a; + --md-sys-color-on-info: #c3d4ff; + --md-sys-color-info-container: #004ba5; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ffdedb; + --md-sys-color-inverse-success: #89fcbf; + --md-sys-color-inverse-warning: #ffe2b1; + --md-sys-color-inverse-info: #dde5ff; +} + +[data-scheme='teal'][data-contrast='high'][data-theme='dark'], +[data-scheme='teal'][data-contrast='high'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #001111; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #001111; + --md-sys-color-surface-dim: #001111; + --md-sys-color-surface-bright: #003231; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #001716; + --md-sys-color-surface-container: #001e1d; + --md-sys-color-surface-container-high: #002424; + --md-sys-color-surface-container-highest: #002b2a; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #b5f0ee; + --md-sys-color-outline: #89c3c1; + --md-sys-color-outline-variant: #74aeac; + --md-sys-color-inverse-surface: #e3fffd; + --md-sys-color-inverse-on-surface: #000000; + --md-sys-color-primary: #b4fff1; + --md-sys-color-primary-dim: #00fee5; + --md-sys-color-on-primary: #003a34; + --md-sys-color-primary-container: #00fee5; + --md-sys-color-on-primary-container: #00302a; + --md-sys-color-primary-fixed: #00f7df; + --md-sys-color-primary-fixed-dim: #00e8d1; + --md-sys-color-on-primary-fixed: #000000; + --md-sys-color-on-primary-fixed-variant: #001f1b; + --md-sys-color-inverse-primary: #004039; + --md-sys-color-secondary: #3efefa; + --md-sys-color-secondary-dim: #1cefeb; + --md-sys-color-on-secondary: #003231; + --md-sys-color-secondary-container: #00b6b3; + --md-sys-color-on-secondary-container: #000000; + --md-sys-color-secondary-fixed: #38fbf7; + --md-sys-color-secondary-fixed-dim: #10ece8; + --md-sys-color-on-secondary-fixed: #000000; + --md-sys-color-on-secondary-fixed-variant: #002423; + --md-sys-color-tertiary: #caeaff; + --md-sys-color-tertiary-dim: #a3dcff; + --md-sys-color-on-tertiary: #003043; + --md-sys-color-tertiary-container: #20c0ff; + --md-sys-color-on-tertiary-container: #000000; + --md-sys-color-tertiary-fixed: #20c0ff; + --md-sys-color-tertiary-fixed-dim: #00b2ee; + --md-sys-color-on-tertiary-fixed: #000000; + --md-sys-color-on-tertiary-fixed-variant: #000000; + --md-sys-color-error: #ffdedb; + --md-sys-color-error-dim: #ffc7c3; + --md-sys-color-on-error: #60000a; + --md-sys-color-error-container: #ff7c76; + --md-sys-color-on-error-container: #000000; + --md-sys-color-success: #89fcbf; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #42b880; + --md-sys-color-on-success-container: #000000; + --md-sys-color-warning: #ffe2b1; + --md-sys-color-on-warning: #3c2900; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #000000; + --md-sys-color-info: #dde5ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #74a2ff; + --md-sys-color-on-info-container: #000000; + --md-sys-color-inverse-error: #480005; + --md-sys-color-inverse-success: #002515; + --md-sys-color-inverse-warning: #2c1d00; + --md-sys-color-inverse-info: #001e4a; } [data-scheme='rose'], @@ -496,22 +1354,22 @@ --md-sys-color-on-error: #ffefee; --md-sys-color-error-container: #fb5151; --md-sys-color-on-error-container: #570008; - --md-sys-color-success: #006c45; - --md-sys-color-on-success: #ffffff; + --md-sys-color-success: #006943; + --md-sys-color-on-success: #caffdd; --md-sys-color-success-container: #86f9bc; - --md-sys-color-on-success-container: #002112; - --md-sys-color-warning: #7c5800; - --md-sys-color-on-warning: #ffffff; - --md-sys-color-warning-container: #ffdea6; - --md-sys-color-on-warning-container: #271900; - --md-sys-color-info: #005ac4; - --md-sys-color-on-info: #ffffff; - --md-sys-color-info-container: #d8e2ff; - --md-sys-color-on-info-container: #001a42; + --md-sys-color-on-success-container: #00734a; + --md-sys-color-warning: #785500; + --md-sys-color-on-warning: #fff1dd; + --md-sys-color-warning-container: #fab925; + --md-sys-color-on-warning-container: #6a4b00; + --md-sys-color-info: #0057be; + --md-sys-color-on-info: #f0f2ff; + --md-sys-color-info-container: #1c7afc; + --md-sys-color-on-info-container: #001435; --md-sys-color-inverse-error: #ff716c; - --md-sys-color-inverse-success: #69dca1; - --md-sys-color-inverse-warning: #fdbb28; - --md-sys-color-inverse-info: #aec6ff; + --md-sys-color-inverse-success: #3bb27b; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #699cff; } [data-scheme='rose'][data-theme='dark'], @@ -567,20 +1425,306 @@ --md-sys-color-on-error: #490006; --md-sys-color-error-container: #9f0519; --md-sys-color-on-error-container: #ffa8a3; - --md-sys-color-success: #69dca1; - --md-sys-color-on-success: #003822; - --md-sys-color-success-container: #005233; - --md-sys-color-on-success-container: #86f9bc; - --md-sys-color-warning: #fdbb28; - --md-sys-color-on-warning: #412d00; - --md-sys-color-warning-container: #5e4200; - --md-sys-color-on-warning-container: #ffdea6; - --md-sys-color-info: #aec6ff; - --md-sys-color-on-info: #002e6a; - --md-sys-color-info-container: #004396; - --md-sys-color-on-info-container: #d8e2ff; + --md-sys-color-success: #3bb27b; + --md-sys-color-on-success: #002615; + --md-sys-color-success-container: #059460; + --md-sys-color-on-success-container: #001e10; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #4e3600; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #593f00; + --md-sys-color-info: #699cff; + --md-sys-color-on-info: #001e4b; + --md-sys-color-info-container: #0c74f6; + --md-sys-color-on-info-container: #000a23; --md-sys-color-inverse-error: #b31b25; - --md-sys-color-inverse-success: #006c45; - --md-sys-color-inverse-warning: #7c5800; - --md-sys-color-inverse-info: #005ac4; + --md-sys-color-inverse-success: #006943; + --md-sys-color-inverse-warning: #785500; + --md-sys-color-inverse-info: #0057be; +} + +[data-scheme='rose'][data-contrast='medium'], +[data-scheme='rose'][data-contrast='medium'][data-theme='light'], +[data-scheme='rose'][data-contrast='medium'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #fff4f6; + --md-sys-color-on-background: #371226; + --md-sys-color-surface: #fff4f6; + --md-sys-color-surface-dim: #ffc4de; + --md-sys-color-surface-bright: #fff4f6; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #ffecf2; + --md-sys-color-surface-container: #ffe0ec; + --md-sys-color-surface-container-high: #ffd8e8; + --md-sys-color-surface-container-highest: #ffd0e4; + --md-sys-color-on-surface: #371226; + --md-sys-color-on-surface-variant: #5d3247; + --md-sys-color-outline: #7c4d64; + --md-sys-color-outline-variant: #9b6880; + --md-sys-color-inverse-surface: #220215; + --md-sys-color-inverse-on-surface: #f0b4ce; + --md-sys-color-primary: #820038; + --md-sys-color-primary-dim: #6d002e; + --md-sys-color-on-primary: #ffc5d0; + --md-sys-color-primary-container: #d03a6c; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #d03a6c; + --md-sys-color-primary-fixed-dim: #c02d5f; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #ff6994; + --md-sys-color-secondary: #751751; + --md-sys-color-secondary-dim: #660845; + --md-sys-color-on-secondary: #ffc4dd; + --md-sys-color-secondary-container: #b85088; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #b85088; + --md-sys-color-secondary-fixed-dim: #a8437b; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #3f2b96; + --md-sys-color-tertiary-dim: #341d8a; + --md-sys-color-on-tertiary: #d7ceff; + --md-sys-color-tertiary-container: #7565cf; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #7565cf; + --md-sys-color-tertiary-fixed-dim: #6958c2; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #850012; + --md-sys-color-error-dim: #70000d; + --md-sys-color-on-error: #ffc7c2; + --md-sys-color-error-container: #d7383b; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #00492d; + --md-sys-color-on-success: #77eaae; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #543b00; + --md-sys-color-on-warning: #ffcd6d; + --md-sys-color-warning-container: #986d00; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #003c87; + --md-sys-color-on-info: #c3d4ff; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ff9f99; + --md-sys-color-inverse-success: #5ace94; + --md-sys-color-inverse-warning: #f3b31e; + --md-sys-color-inverse-info: #98b8ff; +} + +[data-scheme='rose'][data-contrast='medium'][data-theme='dark'], +[data-scheme='rose'][data-contrast='medium'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #220215; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #220215; + --md-sys-color-surface-dim: #220215; + --md-sys-color-surface-bright: #4e1737; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #2a041b; + --md-sys-color-surface-container: #330822; + --md-sys-color-surface-container-high: #3c0d28; + --md-sys-color-surface-container-highest: #45122f; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #e3a8c2; + --md-sys-color-outline: #ba849d; + --md-sys-color-outline-variant: #99667e; + --md-sys-color-inverse-surface: #fff8f8; + --md-sys-color-inverse-on-surface: #542b40; + --md-sys-color-primary: #ff9cb3; + --md-sys-color-primary-dim: #ff84a3; + --md-sys-color-on-primary: #5e0027; + --md-sys-color-primary-container: #ff7198; + --md-sys-color-on-primary-container: #320011; + --md-sys-color-primary-fixed: #ff7198; + --md-sys-color-primary-fixed-dim: #f95a8a; + --md-sys-color-on-primary-fixed: #000000; + --md-sys-color-on-primary-fixed-variant: #000000; + --md-sys-color-inverse-primary: #a5144d; + --md-sys-color-secondary: #ff99cb; + --md-sys-color-secondary-dim: #f985c1; + --md-sys-color-on-secondary: #5a003c; + --md-sys-color-secondary-container: #b85088; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #ffc0dc; + --md-sys-color-secondary-fixed-dim: #ffabd2; + --md-sys-color-on-secondary-fixed: #230014; + --md-sys-color-on-secondary-fixed-variant: #670845; + --md-sys-color-tertiary: #bbafff; + --md-sys-color-tertiary-dim: #ac9eff; + --md-sys-color-on-tertiary: #2b1082; + --md-sys-color-tertiary-container: #9f8ffc; + --md-sys-color-on-tertiary-container: #100045; + --md-sys-color-tertiary-fixed: #b3a5ff; + --md-sys-color-tertiary-fixed-dim: #a595ff; + --md-sys-color-on-tertiary-fixed: #000000; + --md-sys-color-on-tertiary-fixed-variant: #170059; + --md-sys-color-error: #ff9f99; + --md-sys-color-error-dim: #ff8882; + --md-sys-color-on-error: #60000a; + --md-sys-color-error-container: #d7383b; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #5ace94; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #008656; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #f3b31e; + --md-sys-color-on-warning: #412d00; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #332200; + --md-sys-color-info: #98b8ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #006fef; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #850012; + --md-sys-color-inverse-success: #00492d; + --md-sys-color-inverse-warning: #543b00; + --md-sys-color-inverse-info: #003c87; +} + +[data-scheme='rose'][data-contrast='high'], +[data-scheme='rose'][data-contrast='high'][data-theme='light'], +[data-scheme='rose'][data-contrast='high'] [data-theme='light'] { + color-scheme: light; + + --md-sys-color-background: #fff4f6; + --md-sys-color-on-background: #000000; + --md-sys-color-surface: #fff4f6; + --md-sys-color-surface-dim: #ffc4de; + --md-sys-color-surface-bright: #fff4f6; + --md-sys-color-surface-container-lowest: #ffffff; + --md-sys-color-surface-container-low: #ffecf2; + --md-sys-color-surface-container: #ffe0ec; + --md-sys-color-surface-container-high: #ffd8e8; + --md-sys-color-surface-container-highest: #ffd0e4; + --md-sys-color-on-surface: #000000; + --md-sys-color-on-surface-variant: #371226; + --md-sys-color-outline: #5d3247; + --md-sys-color-outline-variant: #6e4057; + --md-sys-color-inverse-surface: #220215; + --md-sys-color-inverse-on-surface: #ffffff; + --md-sys-color-primary: #46001b; + --md-sys-color-primary-dim: #340012; + --md-sys-color-on-primary: #ffc6d1; + --md-sys-color-primary-container: #9c0947; + --md-sys-color-on-primary-container: #ffffff; + --md-sys-color-primary-fixed: #9c0947; + --md-sys-color-primary-fixed-dim: #89003c; + --md-sys-color-on-primary-fixed: #ffffff; + --md-sys-color-on-primary-fixed-variant: #ffffff; + --md-sys-color-inverse-primary: #ffafc0; + --md-sys-color-secondary: #44002c; + --md-sys-color-secondary-dim: #32001f; + --md-sys-color-on-secondary: #ffc4de; + --md-sys-color-secondary-container: #892961; + --md-sys-color-on-secondary-container: #ffffff; + --md-sys-color-secondary-fixed: #892961; + --md-sys-color-secondary-fixed-dim: #7a1c55; + --md-sys-color-on-secondary-fixed: #ffffff; + --md-sys-color-on-secondary-fixed-variant: #ffffff; + --md-sys-color-tertiary: #1e006d; + --md-sys-color-tertiary-dim: #150052; + --md-sys-color-on-tertiary: #d7cfff; + --md-sys-color-tertiary-container: #4f3da6; + --md-sys-color-on-tertiary-container: #ffffff; + --md-sys-color-tertiary-fixed: #4f3da6; + --md-sys-color-tertiary-fixed-dim: #43309a; + --md-sys-color-on-tertiary-fixed: #ffffff; + --md-sys-color-on-tertiary-fixed-variant: #ffffff; + --md-sys-color-error: #480005; + --md-sys-color-error-dim: #350003; + --md-sys-color-on-error: #ffc7c3; + --md-sys-color-error-container: #a0071a; + --md-sys-color-on-error-container: #ffffff; + --md-sys-color-success: #002515; + --md-sys-color-on-success: #78eaaf; + --md-sys-color-success-container: #005b39; + --md-sys-color-on-success-container: #ffffff; + --md-sys-color-warning: #2c1d00; + --md-sys-color-on-warning: #ffcd6f; + --md-sys-color-warning-container: #684900; + --md-sys-color-on-warning-container: #ffffff; + --md-sys-color-info: #001e4a; + --md-sys-color-on-info: #c3d4ff; + --md-sys-color-info-container: #004ba5; + --md-sys-color-on-info-container: #ffffff; + --md-sys-color-inverse-error: #ffdedb; + --md-sys-color-inverse-success: #89fcbf; + --md-sys-color-inverse-warning: #ffe2b1; + --md-sys-color-inverse-info: #dde5ff; +} + +[data-scheme='rose'][data-contrast='high'][data-theme='dark'], +[data-scheme='rose'][data-contrast='high'] [data-theme='dark'] { + color-scheme: dark; + + --md-sys-color-background: #220215; + --md-sys-color-on-background: #ffffff; + --md-sys-color-surface: #220215; + --md-sys-color-surface-dim: #220215; + --md-sys-color-surface-bright: #4e1737; + --md-sys-color-surface-container-lowest: #000000; + --md-sys-color-surface-container-low: #2a041b; + --md-sys-color-surface-container: #330822; + --md-sys-color-surface-container-high: #3c0d28; + --md-sys-color-surface-container-highest: #45122f; + --md-sys-color-on-surface: #ffffff; + --md-sys-color-on-surface-variant: #ffdcea; + --md-sys-color-outline: #e3a8c2; + --md-sys-color-outline-variant: #cc94ad; + --md-sys-color-inverse-surface: #fff8f8; + --md-sys-color-inverse-on-surface: #000000; + --md-sys-color-primary: #ffdde2; + --md-sys-color-primary-dim: #ffc6d1; + --md-sys-color-on-primary: #5e0027; + --md-sys-color-primary-container: #ff779c; + --md-sys-color-on-primary-container: #000000; + --md-sys-color-primary-fixed: #ff779c; + --md-sys-color-primary-fixed-dim: #fd5d8d; + --md-sys-color-on-primary-fixed: #000000; + --md-sys-color-on-primary-fixed-variant: #000000; + --md-sys-color-inverse-primary: #740032; + --md-sys-color-secondary: #ffdcea; + --md-sys-color-secondary-dim: #ffc5de; + --md-sys-color-on-secondary: #5a003c; + --md-sys-color-secondary-container: #f07eb9; + --md-sys-color-on-secondary-container: #000000; + --md-sys-color-secondary-fixed: #ffc0dc; + --md-sys-color-secondary-fixed-dim: #ffabd2; + --md-sys-color-on-secondary-fixed: #000000; + --md-sys-color-on-secondary-fixed-variant: #230014; + --md-sys-color-tertiary: #e8e2ff; + --md-sys-color-tertiary-dim: #d7cfff; + --md-sys-color-on-tertiary: #2b1082; + --md-sys-color-tertiary-container: #a595ff; + --md-sys-color-on-tertiary-container: #000000; + --md-sys-color-tertiary-fixed: #b3a5ff; + --md-sys-color-tertiary-fixed-dim: #a595ff; + --md-sys-color-on-tertiary-fixed: #000000; + --md-sys-color-on-tertiary-fixed-variant: #000000; + --md-sys-color-error: #ffdedb; + --md-sys-color-error-dim: #ffc7c3; + --md-sys-color-on-error: #60000a; + --md-sys-color-error-container: #ff7c76; + --md-sys-color-on-error-container: #000000; + --md-sys-color-success: #89fcbf; + --md-sys-color-on-success: #00341e; + --md-sys-color-success-container: #42b880; + --md-sys-color-on-success-container: #000000; + --md-sys-color-warning: #ffe2b1; + --md-sys-color-on-warning: #3c2900; + --md-sys-color-warning-container: #e4a604; + --md-sys-color-on-warning-container: #000000; + --md-sys-color-info: #dde5ff; + --md-sys-color-on-info: #002a62; + --md-sys-color-info-container: #74a2ff; + --md-sys-color-on-info-container: #000000; + --md-sys-color-inverse-error: #480005; + --md-sys-color-inverse-success: #002515; + --md-sys-color-inverse-warning: #2c1d00; + --md-sys-color-inverse-info: #001e4a; } diff --git a/workbench/resources/css/material-scheme.json b/workbench/resources/css/material-scheme.json index 560bf52c..0c65a8fc 100644 --- a/workbench/resources/css/material-scheme.json +++ b/workbench/resources/css/material-scheme.json @@ -2,7 +2,282 @@ "seed": "#6750a4", "variant": "tonal-spot", "spec": "2025", - "contrast": 0, + "harmonize": false, + "contrast": { + "standard": 0, + "medium": { + "light": { + "background": "#fdf7fe", + "on-background": "#25232b", + "surface": "#fdf7fe", + "surface-dim": "#ded8e4", + "surface-bright": "#fdf7fe", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#f8f1fa", + "surface-container": "#f2ecf5", + "surface-container-high": "#ece6f0", + "surface-container-highest": "#e7e0ec", + "on-surface": "#25232b", + "on-surface-variant": "#45414b", + "outline": "#615d68", + "outline-variant": "#7d7983", + "inverse-surface": "#0f0d12", + "inverse-on-surface": "#c8c3c9", + "primary": "#483b6b", + "primary-dim": "#3c305f", + "on-primary": "#e1d3ff", + "primary-container": "#7b6da0", + "on-primary-container": "#ffffff", + "primary-fixed": "#7b6da0", + "primary-fixed-dim": "#6e6093", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#d4c3fd", + "secondary": "#464054", + "secondary-dim": "#3a3548", + "on-secondary": "#dfd5ef", + "secondary-container": "#787187", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#787187", + "secondary-fixed-dim": "#6c657b", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#5c3653", + "tertiary-dim": "#502b47", + "on-tertiary": "#ffcaee", + "tertiary-container": "#936787", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#936787", + "tertiary-fixed-dim": "#855b7a", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#821830", + "error-dim": "#6b0221", + "on-error": "#ffcdd1", + "error-container": "#c44b5f", + "on-error-container": "#ffffff", + "success": "#004d30", + "on-success": "#7df0b3", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#593e00", + "on-warning": "#ffd385", + "warning-container": "#986d00", + "on-warning-container": "#ffffff", + "info": "#003f8e", + "on-info": "#cbd9ff", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#ff9da8", + "inverse-success": "#5ace94", + "inverse-warning": "#f3b31e", + "inverse-info": "#98b8ff" + }, + "dark": { + "background": "#0f0d12", + "on-background": "#ffffff", + "surface": "#0f0d12", + "surface-dim": "#0f0d12", + "surface-bright": "#2e2b34", + "surface-container-lowest": "#000000", + "surface-container-low": "#141218", + "surface-container": "#1b181f", + "surface-container-high": "#211e26", + "surface-container-highest": "#27242d", + "on-surface": "#ffffff", + "on-surface-variant": "#bcb6c2", + "outline": "#96919c", + "outline-variant": "#78737e", + "inverse-surface": "#fdf7fe", + "inverse-on-surface": "#39373c", + "primary": "#cdc0ec", + "primary-dim": "#bfb2de", + "on-primary": "#3a3054", + "primary-container": "#7a6f96", + "on-primary-container": "#ffffff", + "primary-fixed": "#ded0fe", + "primary-fixed-dim": "#d0c3ef", + "on-primary-fixed": "#180e30", + "on-primary-fixed-variant": "#3c3256", + "inverse-primary": "#5a4f75", + "secondary": "#cbc2db", + "secondary-dim": "#beb5cd", + "on-secondary": "#393347", + "secondary-container": "#787187", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#e8def8", + "secondary-fixed-dim": "#dad0ea", + "on-secondary-fixed": "#221d2f", + "on-secondary-fixed-variant": "#423c50", + "tertiary": "#ffcfef", + "tertiary-dim": "#f4bfe3", + "on-tertiary": "#5e3855", + "tertiary-container": "#f4bfe3", + "on-tertiary-container": "#542f4c", + "tertiary-fixed": "#f4bfe3", + "tertiary-fixed-dim": "#e5b2d5", + "on-tertiary-fixed": "#180015", + "on-tertiary-fixed-variant": "#4a2642", + "error": "#ff9da8", + "error-dim": "#ff8695", + "on-error": "#5f001c", + "error-container": "#c44b5f", + "on-error-container": "#ffffff", + "success": "#5ace94", + "on-success": "#00341e", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#f3b31e", + "on-warning": "#412d00", + "warning-container": "#e4a604", + "on-warning-container": "#332200", + "info": "#98b8ff", + "on-info": "#002a62", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#821830", + "inverse-success": "#004d30", + "inverse-warning": "#593e00", + "inverse-info": "#003f8e" + } + }, + "high": { + "light": { + "background": "#fdf7fe", + "on-background": "#000000", + "surface": "#fdf7fe", + "surface-dim": "#ded8e4", + "surface-bright": "#fdf7fe", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#f8f1fa", + "surface-container": "#f2ecf5", + "surface-container-high": "#ece6f0", + "surface-container-highest": "#e7e0ec", + "on-surface": "#000000", + "on-surface-variant": "#25232b", + "outline": "#45414b", + "outline-variant": "#54505a", + "inverse-surface": "#0f0d12", + "inverse-on-surface": "#ffffff", + "primary": "#281b49", + "primary-dim": "#1e103f", + "on-primary": "#e1d3ff", + "primary-container": "#584a7b", + "on-primary-container": "#ffffff", + "primary-fixed": "#584a7b", + "primary-fixed-dim": "#4c3f6f", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#d4c3fd", + "secondary": "#262134", + "secondary-dim": "#1c1729", + "on-secondary": "#dfd6ef", + "secondary-container": "#554f64", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#554f64", + "secondary-fixed-dim": "#494358", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#391733", + "tertiary-dim": "#2e0d28", + "on-tertiary": "#ffcbee", + "tertiary-container": "#6d4563", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#6d4563", + "tertiary-fixed-dim": "#603a57", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#500016", + "error-dim": "#3d000f", + "on-error": "#ffced2", + "error-container": "#97283e", + "on-error-container": "#ffffff", + "success": "#002a18", + "on-success": "#7df0b4", + "success-container": "#005f3c", + "on-success-container": "#ffffff", + "warning": "#312100", + "on-warning": "#ffd486", + "warning-container": "#6c4d00", + "on-warning-container": "#ffffff", + "info": "#002252", + "on-info": "#ccdaff", + "info-container": "#004eac", + "on-info-container": "#ffffff", + "inverse-error": "#ffdddf", + "inverse-success": "#89fcbf", + "inverse-warning": "#ffe2b1", + "inverse-info": "#dde5ff" + }, + "dark": { + "background": "#0f0d12", + "on-background": "#ffffff", + "surface": "#0f0d12", + "surface-dim": "#0f0d12", + "surface-bright": "#2e2b34", + "surface-container-lowest": "#000000", + "surface-container-low": "#141218", + "surface-container": "#1b181f", + "surface-container-high": "#211e26", + "surface-container-highest": "#27242d", + "on-surface": "#ffffff", + "on-surface-variant": "#eae3ef", + "outline": "#bcb6c2", + "outline-variant": "#a7a1ad", + "inverse-surface": "#fdf7fe", + "inverse-on-surface": "#000000", + "primary": "#ebe1ff", + "primary-dim": "#ded0fe", + "on-primary": "#302649", + "primary-container": "#aa9dc8", + "on-primary-container": "#000000", + "primary-fixed": "#ded0fe", + "primary-fixed-dim": "#d0c3ef", + "on-primary-fixed": "#000000", + "on-primary-fixed-variant": "#180e30", + "inverse-primary": "#3c3256", + "secondary": "#ebe1fb", + "secondary-dim": "#ddd3ed", + "on-secondary": "#2e293c", + "secondary-container": "#a8a0b8", + "on-secondary-container": "#000000", + "secondary-fixed": "#e8def8", + "secondary-fixed-dim": "#dad0ea", + "on-secondary-fixed": "#000000", + "on-secondary-fixed-variant": "#221d2f", + "tertiary": "#ffdbf2", + "tertiary-dim": "#fac5e9", + "on-tertiary": "#43203b", + "tertiary-container": "#f4bfe3", + "on-tertiary-container": "#2e0e29", + "tertiary-fixed": "#f4bfe3", + "tertiary-fixed-dim": "#e5b2d5", + "on-tertiary-fixed": "#000000", + "on-tertiary-fixed-variant": "#180015", + "error": "#ffdddf", + "error-dim": "#ffc7cb", + "on-error": "#5f001c", + "error-container": "#ff798c", + "on-error-container": "#000000", + "success": "#89fcbf", + "on-success": "#00341e", + "success-container": "#42b880", + "on-success-container": "#000000", + "warning": "#ffe2b1", + "on-warning": "#3c2900", + "warning-container": "#e4a604", + "on-warning-container": "#000000", + "info": "#dde5ff", + "on-info": "#002a62", + "info-container": "#74a2ff", + "on-info-container": "#000000", + "inverse-error": "#500016", + "inverse-success": "#002a18", + "inverse-warning": "#312100", + "inverse-info": "#002252" + } + } + }, "light": { "background": "#fdf7fe", "on-background": "#34313a", @@ -53,22 +328,22 @@ "on-error": "#fff7f7", "error-container": "#f97386", "on-error-container": "#6e0523", - "success": "#006c45", - "on-success": "#ffffff", + "success": "#006d46", + "on-success": "#e7ffed", "success-container": "#86f9bc", - "on-success-container": "#002112", - "warning": "#7c5800", - "on-warning": "#ffffff", - "warning-container": "#ffdea6", - "on-warning-container": "#271900", - "info": "#005ac4", - "on-info": "#ffffff", - "info-container": "#d8e2ff", - "on-info-container": "#001a42", + "on-success-container": "#00734a", + "warning": "#7c5900", + "on-warning": "#fff8f1", + "warning-container": "#fab925", + "on-warning-container": "#6a4b00", + "info": "#005bc5", + "on-info": "#f9f8ff", + "info-container": "#1c7afc", + "on-info-container": "#001435", "inverse-error": "#f97386", - "inverse-success": "#69dca1", - "inverse-warning": "#fdbb28", - "inverse-info": "#aec6ff" + "inverse-success": "#3bb27b", + "inverse-warning": "#f3b31e", + "inverse-info": "#699cff" }, "dark": { "background": "#0f0d12", @@ -120,22 +395,22 @@ "on-error": "#490013", "error-container": "#871c34", "on-error-container": "#ff97a3", - "success": "#69dca1", - "on-success": "#003822", - "success-container": "#005233", - "on-success-container": "#86f9bc", - "warning": "#fdbb28", - "on-warning": "#412d00", - "warning-container": "#5e4200", - "on-warning-container": "#ffdea6", - "info": "#aec6ff", - "on-info": "#002e6a", - "info-container": "#004396", - "on-info-container": "#d8e2ff", + "success": "#3bb27b", + "on-success": "#002615", + "success-container": "#059460", + "on-success-container": "#001e10", + "warning": "#f3b31e", + "on-warning": "#4e3600", + "warning-container": "#e4a604", + "on-warning-container": "#593f00", + "info": "#699cff", + "on-info": "#001e4b", + "info-container": "#0c74f6", + "on-info-container": "#000a23", "inverse-error": "#a8364b", - "inverse-success": "#006c45", - "inverse-warning": "#7c5800", - "inverse-info": "#005ac4" + "inverse-success": "#006d46", + "inverse-warning": "#7c5900", + "inverse-info": "#005bc5" }, "default": "baseline", "profiles": { @@ -144,7 +419,282 @@ "seed": "#6750a4", "variant": "tonal-spot", "spec": "2025", - "contrast": 0, + "harmonize": false, + "contrast": { + "standard": 0, + "medium": { + "light": { + "background": "#fdf7fe", + "on-background": "#25232b", + "surface": "#fdf7fe", + "surface-dim": "#ded8e4", + "surface-bright": "#fdf7fe", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#f8f1fa", + "surface-container": "#f2ecf5", + "surface-container-high": "#ece6f0", + "surface-container-highest": "#e7e0ec", + "on-surface": "#25232b", + "on-surface-variant": "#45414b", + "outline": "#615d68", + "outline-variant": "#7d7983", + "inverse-surface": "#0f0d12", + "inverse-on-surface": "#c8c3c9", + "primary": "#483b6b", + "primary-dim": "#3c305f", + "on-primary": "#e1d3ff", + "primary-container": "#7b6da0", + "on-primary-container": "#ffffff", + "primary-fixed": "#7b6da0", + "primary-fixed-dim": "#6e6093", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#d4c3fd", + "secondary": "#464054", + "secondary-dim": "#3a3548", + "on-secondary": "#dfd5ef", + "secondary-container": "#787187", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#787187", + "secondary-fixed-dim": "#6c657b", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#5c3653", + "tertiary-dim": "#502b47", + "on-tertiary": "#ffcaee", + "tertiary-container": "#936787", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#936787", + "tertiary-fixed-dim": "#855b7a", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#821830", + "error-dim": "#6b0221", + "on-error": "#ffcdd1", + "error-container": "#c44b5f", + "on-error-container": "#ffffff", + "success": "#004d30", + "on-success": "#7df0b3", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#593e00", + "on-warning": "#ffd385", + "warning-container": "#986d00", + "on-warning-container": "#ffffff", + "info": "#003f8e", + "on-info": "#cbd9ff", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#ff9da8", + "inverse-success": "#5ace94", + "inverse-warning": "#f3b31e", + "inverse-info": "#98b8ff" + }, + "dark": { + "background": "#0f0d12", + "on-background": "#ffffff", + "surface": "#0f0d12", + "surface-dim": "#0f0d12", + "surface-bright": "#2e2b34", + "surface-container-lowest": "#000000", + "surface-container-low": "#141218", + "surface-container": "#1b181f", + "surface-container-high": "#211e26", + "surface-container-highest": "#27242d", + "on-surface": "#ffffff", + "on-surface-variant": "#bcb6c2", + "outline": "#96919c", + "outline-variant": "#78737e", + "inverse-surface": "#fdf7fe", + "inverse-on-surface": "#39373c", + "primary": "#cdc0ec", + "primary-dim": "#bfb2de", + "on-primary": "#3a3054", + "primary-container": "#7a6f96", + "on-primary-container": "#ffffff", + "primary-fixed": "#ded0fe", + "primary-fixed-dim": "#d0c3ef", + "on-primary-fixed": "#180e30", + "on-primary-fixed-variant": "#3c3256", + "inverse-primary": "#5a4f75", + "secondary": "#cbc2db", + "secondary-dim": "#beb5cd", + "on-secondary": "#393347", + "secondary-container": "#787187", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#e8def8", + "secondary-fixed-dim": "#dad0ea", + "on-secondary-fixed": "#221d2f", + "on-secondary-fixed-variant": "#423c50", + "tertiary": "#ffcfef", + "tertiary-dim": "#f4bfe3", + "on-tertiary": "#5e3855", + "tertiary-container": "#f4bfe3", + "on-tertiary-container": "#542f4c", + "tertiary-fixed": "#f4bfe3", + "tertiary-fixed-dim": "#e5b2d5", + "on-tertiary-fixed": "#180015", + "on-tertiary-fixed-variant": "#4a2642", + "error": "#ff9da8", + "error-dim": "#ff8695", + "on-error": "#5f001c", + "error-container": "#c44b5f", + "on-error-container": "#ffffff", + "success": "#5ace94", + "on-success": "#00341e", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#f3b31e", + "on-warning": "#412d00", + "warning-container": "#e4a604", + "on-warning-container": "#332200", + "info": "#98b8ff", + "on-info": "#002a62", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#821830", + "inverse-success": "#004d30", + "inverse-warning": "#593e00", + "inverse-info": "#003f8e" + } + }, + "high": { + "light": { + "background": "#fdf7fe", + "on-background": "#000000", + "surface": "#fdf7fe", + "surface-dim": "#ded8e4", + "surface-bright": "#fdf7fe", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#f8f1fa", + "surface-container": "#f2ecf5", + "surface-container-high": "#ece6f0", + "surface-container-highest": "#e7e0ec", + "on-surface": "#000000", + "on-surface-variant": "#25232b", + "outline": "#45414b", + "outline-variant": "#54505a", + "inverse-surface": "#0f0d12", + "inverse-on-surface": "#ffffff", + "primary": "#281b49", + "primary-dim": "#1e103f", + "on-primary": "#e1d3ff", + "primary-container": "#584a7b", + "on-primary-container": "#ffffff", + "primary-fixed": "#584a7b", + "primary-fixed-dim": "#4c3f6f", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#d4c3fd", + "secondary": "#262134", + "secondary-dim": "#1c1729", + "on-secondary": "#dfd6ef", + "secondary-container": "#554f64", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#554f64", + "secondary-fixed-dim": "#494358", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#391733", + "tertiary-dim": "#2e0d28", + "on-tertiary": "#ffcbee", + "tertiary-container": "#6d4563", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#6d4563", + "tertiary-fixed-dim": "#603a57", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#500016", + "error-dim": "#3d000f", + "on-error": "#ffced2", + "error-container": "#97283e", + "on-error-container": "#ffffff", + "success": "#002a18", + "on-success": "#7df0b4", + "success-container": "#005f3c", + "on-success-container": "#ffffff", + "warning": "#312100", + "on-warning": "#ffd486", + "warning-container": "#6c4d00", + "on-warning-container": "#ffffff", + "info": "#002252", + "on-info": "#ccdaff", + "info-container": "#004eac", + "on-info-container": "#ffffff", + "inverse-error": "#ffdddf", + "inverse-success": "#89fcbf", + "inverse-warning": "#ffe2b1", + "inverse-info": "#dde5ff" + }, + "dark": { + "background": "#0f0d12", + "on-background": "#ffffff", + "surface": "#0f0d12", + "surface-dim": "#0f0d12", + "surface-bright": "#2e2b34", + "surface-container-lowest": "#000000", + "surface-container-low": "#141218", + "surface-container": "#1b181f", + "surface-container-high": "#211e26", + "surface-container-highest": "#27242d", + "on-surface": "#ffffff", + "on-surface-variant": "#eae3ef", + "outline": "#bcb6c2", + "outline-variant": "#a7a1ad", + "inverse-surface": "#fdf7fe", + "inverse-on-surface": "#000000", + "primary": "#ebe1ff", + "primary-dim": "#ded0fe", + "on-primary": "#302649", + "primary-container": "#aa9dc8", + "on-primary-container": "#000000", + "primary-fixed": "#ded0fe", + "primary-fixed-dim": "#d0c3ef", + "on-primary-fixed": "#000000", + "on-primary-fixed-variant": "#180e30", + "inverse-primary": "#3c3256", + "secondary": "#ebe1fb", + "secondary-dim": "#ddd3ed", + "on-secondary": "#2e293c", + "secondary-container": "#a8a0b8", + "on-secondary-container": "#000000", + "secondary-fixed": "#e8def8", + "secondary-fixed-dim": "#dad0ea", + "on-secondary-fixed": "#000000", + "on-secondary-fixed-variant": "#221d2f", + "tertiary": "#ffdbf2", + "tertiary-dim": "#fac5e9", + "on-tertiary": "#43203b", + "tertiary-container": "#f4bfe3", + "on-tertiary-container": "#2e0e29", + "tertiary-fixed": "#f4bfe3", + "tertiary-fixed-dim": "#e5b2d5", + "on-tertiary-fixed": "#000000", + "on-tertiary-fixed-variant": "#180015", + "error": "#ffdddf", + "error-dim": "#ffc7cb", + "on-error": "#5f001c", + "error-container": "#ff798c", + "on-error-container": "#000000", + "success": "#89fcbf", + "on-success": "#00341e", + "success-container": "#42b880", + "on-success-container": "#000000", + "warning": "#ffe2b1", + "on-warning": "#3c2900", + "warning-container": "#e4a604", + "on-warning-container": "#000000", + "info": "#dde5ff", + "on-info": "#002a62", + "info-container": "#74a2ff", + "on-info-container": "#000000", + "inverse-error": "#500016", + "inverse-success": "#002a18", + "inverse-warning": "#312100", + "inverse-info": "#002252" + } + } + }, "light": { "background": "#fdf7fe", "on-background": "#34313a", @@ -195,22 +745,22 @@ "on-error": "#fff7f7", "error-container": "#f97386", "on-error-container": "#6e0523", - "success": "#006c45", - "on-success": "#ffffff", + "success": "#006d46", + "on-success": "#e7ffed", "success-container": "#86f9bc", - "on-success-container": "#002112", - "warning": "#7c5800", - "on-warning": "#ffffff", - "warning-container": "#ffdea6", - "on-warning-container": "#271900", - "info": "#005ac4", - "on-info": "#ffffff", - "info-container": "#d8e2ff", - "on-info-container": "#001a42", + "on-success-container": "#00734a", + "warning": "#7c5900", + "on-warning": "#fff8f1", + "warning-container": "#fab925", + "on-warning-container": "#6a4b00", + "info": "#005bc5", + "on-info": "#f9f8ff", + "info-container": "#1c7afc", + "on-info-container": "#001435", "inverse-error": "#f97386", - "inverse-success": "#69dca1", - "inverse-warning": "#fdbb28", - "inverse-info": "#aec6ff" + "inverse-success": "#3bb27b", + "inverse-warning": "#f3b31e", + "inverse-info": "#699cff" }, "dark": { "background": "#0f0d12", @@ -262,22 +812,22 @@ "on-error": "#490013", "error-container": "#871c34", "on-error-container": "#ff97a3", - "success": "#69dca1", - "on-success": "#003822", - "success-container": "#005233", - "on-success-container": "#86f9bc", - "warning": "#fdbb28", - "on-warning": "#412d00", - "warning-container": "#5e4200", - "on-warning-container": "#ffdea6", - "info": "#aec6ff", - "on-info": "#002e6a", - "info-container": "#004396", - "on-info-container": "#d8e2ff", + "success": "#3bb27b", + "on-success": "#002615", + "success-container": "#059460", + "on-success-container": "#001e10", + "warning": "#f3b31e", + "on-warning": "#4e3600", + "warning-container": "#e4a604", + "on-warning-container": "#593f00", + "info": "#699cff", + "on-info": "#001e4b", + "info-container": "#0c74f6", + "on-info-container": "#000a23", "inverse-error": "#a8364b", - "inverse-success": "#006c45", - "inverse-warning": "#7c5800", - "inverse-info": "#005ac4" + "inverse-success": "#006d46", + "inverse-warning": "#7c5900", + "inverse-info": "#005bc5" } }, "teal": { @@ -285,7 +835,282 @@ "seed": "#00897b", "variant": "vibrant", "spec": "2025", - "contrast": 0, + "harmonize": false, + "contrast": { + "standard": 0, + "medium": { + "light": { + "background": "#d3fffd", + "on-background": "#002423", + "surface": "#d3fffd", + "surface-dim": "#87e4e1", + "surface-bright": "#d3fffd", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#bafdfa", + "surface-container": "#adf5f2", + "surface-container-high": "#a2f0ed", + "surface-container-highest": "#96ece8", + "on-surface": "#002423", + "on-surface-variant": "#004746", + "outline": "#296463", + "outline-variant": "#46807e", + "inverse-surface": "#001111", + "inverse-on-surface": "#95cfcd", + "primary": "#004840", + "primary-dim": "#003c35", + "on-primary": "#00eed6", + "primary-container": "#008376", + "on-primary-container": "#ffffff", + "primary-fixed": "#008376", + "primary-fixed-dim": "#007569", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#00fee5", + "secondary": "#004746", + "secondary-dim": "#003b3a", + "on-secondary": "#0eece8", + "secondary-container": "#008280", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#008280", + "secondary-fixed-dim": "#007573", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#00445e", + "tertiary-dim": "#00394f", + "on-tertiary": "#a1dcff", + "tertiary-container": "#007da9", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#007da9", + "tertiary-fixed-dim": "#007098", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#850012", + "error-dim": "#70000d", + "on-error": "#ffc7c2", + "error-container": "#d7383b", + "on-error-container": "#ffffff", + "success": "#00492d", + "on-success": "#77eaae", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#543b00", + "on-warning": "#ffcd6d", + "warning-container": "#986d00", + "on-warning-container": "#ffffff", + "info": "#003c87", + "on-info": "#c3d4ff", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#ff9f99", + "inverse-success": "#5ace94", + "inverse-warning": "#f3b31e", + "inverse-info": "#98b8ff" + }, + "dark": { + "background": "#001111", + "on-background": "#ffffff", + "surface": "#001111", + "surface-dim": "#001111", + "surface-bright": "#003231", + "surface-container-lowest": "#000000", + "surface-container-low": "#001716", + "surface-container": "#001e1d", + "surface-container-high": "#002424", + "surface-container-highest": "#002b2a", + "on-surface": "#ffffff", + "on-surface-variant": "#89c3c1", + "outline": "#649d9b", + "outline-variant": "#457f7d", + "inverse-surface": "#e3fffd", + "inverse-on-surface": "#003f3e", + "primary": "#b4fff1", + "primary-dim": "#00fee5", + "on-primary": "#005b51", + "primary-container": "#00fee5", + "on-primary-container": "#005249", + "primary-fixed": "#00f7df", + "primary-fixed-dim": "#00e8d1", + "on-primary-fixed": "#001f1b", + "on-primary-fixed-variant": "#00443c", + "inverse-primary": "#006056", + "secondary": "#38fbf7", + "secondary-dim": "#10ece8", + "on-secondary": "#005150", + "secondary-container": "#008280", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#38fbf7", + "secondary-fixed-dim": "#10ece8", + "on-secondary-fixed": "#002423", + "on-secondary-fixed-variant": "#004746", + "tertiary": "#68ccff", + "tertiary-dim": "#20c0ff", + "on-tertiary": "#00374c", + "tertiary-container": "#20c0ff", + "on-tertiary-container": "#002b3d", + "tertiary-fixed": "#20c0ff", + "tertiary-fixed-dim": "#00b2ee", + "on-tertiary-fixed": "#000000", + "on-tertiary-fixed-variant": "#001e2b", + "error": "#ff9f99", + "error-dim": "#ff8882", + "on-error": "#60000a", + "error-container": "#d7383b", + "on-error-container": "#ffffff", + "success": "#5ace94", + "on-success": "#00341e", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#f3b31e", + "on-warning": "#412d00", + "warning-container": "#e4a604", + "on-warning-container": "#332200", + "info": "#98b8ff", + "on-info": "#002a62", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#850012", + "inverse-success": "#00492d", + "inverse-warning": "#543b00", + "inverse-info": "#003c87" + } + }, + "high": { + "light": { + "background": "#d3fffd", + "on-background": "#000000", + "surface": "#d3fffd", + "surface-dim": "#87e4e1", + "surface-bright": "#d3fffd", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#bafdfa", + "surface-container": "#adf5f2", + "surface-container-high": "#a2f0ed", + "surface-container-highest": "#96ece8", + "on-surface": "#000000", + "on-surface-variant": "#002423", + "outline": "#004746", + "outline-variant": "#185756", + "inverse-surface": "#001111", + "inverse-on-surface": "#ffffff", + "primary": "#002420", + "primary-dim": "#001916", + "on-primary": "#00eed7", + "primary-container": "#00594f", + "on-primary-container": "#ffffff", + "primary-fixed": "#00594f", + "primary-fixed-dim": "#004c44", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#00fee5", + "secondary": "#002423", + "secondary-dim": "#001918", + "on-secondary": "#11ece9", + "secondary-container": "#005857", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#005857", + "secondary-fixed-dim": "#004c4a", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#002232", + "tertiary-dim": "#001824", + "on-tertiary": "#a2dcff", + "tertiary-container": "#005574", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#005574", + "tertiary-fixed-dim": "#004864", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#480005", + "error-dim": "#350003", + "on-error": "#ffc7c3", + "error-container": "#a0071a", + "on-error-container": "#ffffff", + "success": "#002515", + "on-success": "#78eaaf", + "success-container": "#005b39", + "on-success-container": "#ffffff", + "warning": "#2c1d00", + "on-warning": "#ffcd6f", + "warning-container": "#684900", + "on-warning-container": "#ffffff", + "info": "#001e4a", + "on-info": "#c3d4ff", + "info-container": "#004ba5", + "on-info-container": "#ffffff", + "inverse-error": "#ffdedb", + "inverse-success": "#89fcbf", + "inverse-warning": "#ffe2b1", + "inverse-info": "#dde5ff" + }, + "dark": { + "background": "#001111", + "on-background": "#ffffff", + "surface": "#001111", + "surface-dim": "#001111", + "surface-bright": "#003231", + "surface-container-lowest": "#000000", + "surface-container-low": "#001716", + "surface-container": "#001e1d", + "surface-container-high": "#002424", + "surface-container-highest": "#002b2a", + "on-surface": "#ffffff", + "on-surface-variant": "#b5f0ee", + "outline": "#89c3c1", + "outline-variant": "#74aeac", + "inverse-surface": "#e3fffd", + "inverse-on-surface": "#000000", + "primary": "#b4fff1", + "primary-dim": "#00fee5", + "on-primary": "#003a34", + "primary-container": "#00fee5", + "on-primary-container": "#00302a", + "primary-fixed": "#00f7df", + "primary-fixed-dim": "#00e8d1", + "on-primary-fixed": "#000000", + "on-primary-fixed-variant": "#001f1b", + "inverse-primary": "#004039", + "secondary": "#3efefa", + "secondary-dim": "#1cefeb", + "on-secondary": "#003231", + "secondary-container": "#00b6b3", + "on-secondary-container": "#000000", + "secondary-fixed": "#38fbf7", + "secondary-fixed-dim": "#10ece8", + "on-secondary-fixed": "#000000", + "on-secondary-fixed-variant": "#002423", + "tertiary": "#caeaff", + "tertiary-dim": "#a3dcff", + "on-tertiary": "#003043", + "tertiary-container": "#20c0ff", + "on-tertiary-container": "#000000", + "tertiary-fixed": "#20c0ff", + "tertiary-fixed-dim": "#00b2ee", + "on-tertiary-fixed": "#000000", + "on-tertiary-fixed-variant": "#000000", + "error": "#ffdedb", + "error-dim": "#ffc7c3", + "on-error": "#60000a", + "error-container": "#ff7c76", + "on-error-container": "#000000", + "success": "#89fcbf", + "on-success": "#00341e", + "success-container": "#42b880", + "on-success-container": "#000000", + "warning": "#ffe2b1", + "on-warning": "#3c2900", + "warning-container": "#e4a604", + "on-warning-container": "#000000", + "info": "#dde5ff", + "on-info": "#002a62", + "info-container": "#74a2ff", + "on-info-container": "#000000", + "inverse-error": "#480005", + "inverse-success": "#002515", + "inverse-warning": "#2c1d00", + "inverse-info": "#001e4a" + } + } + }, "light": { "background": "#d3fffd", "on-background": "#003534", @@ -336,22 +1161,22 @@ "on-error": "#ffefee", "error-container": "#fb5151", "on-error-container": "#570008", - "success": "#006c45", - "on-success": "#ffffff", + "success": "#006943", + "on-success": "#caffdd", "success-container": "#86f9bc", - "on-success-container": "#002112", - "warning": "#7c5800", - "on-warning": "#ffffff", - "warning-container": "#ffdea6", - "on-warning-container": "#271900", - "info": "#005ac4", - "on-info": "#ffffff", - "info-container": "#d8e2ff", - "on-info-container": "#001a42", + "on-success-container": "#00734a", + "warning": "#785500", + "on-warning": "#fff1dd", + "warning-container": "#fab925", + "on-warning-container": "#6a4b00", + "info": "#0057be", + "on-info": "#f0f2ff", + "info-container": "#1c7afc", + "on-info-container": "#001435", "inverse-error": "#ff716c", - "inverse-success": "#69dca1", - "inverse-warning": "#fdbb28", - "inverse-info": "#aec6ff" + "inverse-success": "#3bb27b", + "inverse-warning": "#f3b31e", + "inverse-info": "#699cff" }, "dark": { "background": "#001111", @@ -403,22 +1228,22 @@ "on-error": "#490006", "error-container": "#9f0519", "on-error-container": "#ffa8a3", - "success": "#69dca1", - "on-success": "#003822", - "success-container": "#005233", - "on-success-container": "#86f9bc", - "warning": "#fdbb28", - "on-warning": "#412d00", - "warning-container": "#5e4200", - "on-warning-container": "#ffdea6", - "info": "#aec6ff", - "on-info": "#002e6a", - "info-container": "#004396", - "on-info-container": "#d8e2ff", + "success": "#3bb27b", + "on-success": "#002615", + "success-container": "#059460", + "on-success-container": "#001e10", + "warning": "#f3b31e", + "on-warning": "#4e3600", + "warning-container": "#e4a604", + "on-warning-container": "#593f00", + "info": "#699cff", + "on-info": "#001e4b", + "info-container": "#0c74f6", + "on-info-container": "#000a23", "inverse-error": "#b31b25", - "inverse-success": "#006c45", - "inverse-warning": "#7c5800", - "inverse-info": "#005ac4" + "inverse-success": "#006943", + "inverse-warning": "#785500", + "inverse-info": "#0057be" } }, "rose": { @@ -426,7 +1251,282 @@ "seed": "#c2185b", "variant": "vibrant", "spec": "2025", - "contrast": 0, + "harmonize": false, + "contrast": { + "standard": 0, + "medium": { + "light": { + "background": "#fff4f6", + "on-background": "#371226", + "surface": "#fff4f6", + "surface-dim": "#ffc4de", + "surface-bright": "#fff4f6", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#ffecf2", + "surface-container": "#ffe0ec", + "surface-container-high": "#ffd8e8", + "surface-container-highest": "#ffd0e4", + "on-surface": "#371226", + "on-surface-variant": "#5d3247", + "outline": "#7c4d64", + "outline-variant": "#9b6880", + "inverse-surface": "#220215", + "inverse-on-surface": "#f0b4ce", + "primary": "#820038", + "primary-dim": "#6d002e", + "on-primary": "#ffc5d0", + "primary-container": "#d03a6c", + "on-primary-container": "#ffffff", + "primary-fixed": "#d03a6c", + "primary-fixed-dim": "#c02d5f", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#ff6994", + "secondary": "#751751", + "secondary-dim": "#660845", + "on-secondary": "#ffc4dd", + "secondary-container": "#b85088", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#b85088", + "secondary-fixed-dim": "#a8437b", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#3f2b96", + "tertiary-dim": "#341d8a", + "on-tertiary": "#d7ceff", + "tertiary-container": "#7565cf", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#7565cf", + "tertiary-fixed-dim": "#6958c2", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#850012", + "error-dim": "#70000d", + "on-error": "#ffc7c2", + "error-container": "#d7383b", + "on-error-container": "#ffffff", + "success": "#00492d", + "on-success": "#77eaae", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#543b00", + "on-warning": "#ffcd6d", + "warning-container": "#986d00", + "on-warning-container": "#ffffff", + "info": "#003c87", + "on-info": "#c3d4ff", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#ff9f99", + "inverse-success": "#5ace94", + "inverse-warning": "#f3b31e", + "inverse-info": "#98b8ff" + }, + "dark": { + "background": "#220215", + "on-background": "#ffffff", + "surface": "#220215", + "surface-dim": "#220215", + "surface-bright": "#4e1737", + "surface-container-lowest": "#000000", + "surface-container-low": "#2a041b", + "surface-container": "#330822", + "surface-container-high": "#3c0d28", + "surface-container-highest": "#45122f", + "on-surface": "#ffffff", + "on-surface-variant": "#e3a8c2", + "outline": "#ba849d", + "outline-variant": "#99667e", + "inverse-surface": "#fff8f8", + "inverse-on-surface": "#542b40", + "primary": "#ff9cb3", + "primary-dim": "#ff84a3", + "on-primary": "#5e0027", + "primary-container": "#ff7198", + "on-primary-container": "#320011", + "primary-fixed": "#ff7198", + "primary-fixed-dim": "#f95a8a", + "on-primary-fixed": "#000000", + "on-primary-fixed-variant": "#000000", + "inverse-primary": "#a5144d", + "secondary": "#ff99cb", + "secondary-dim": "#f985c1", + "on-secondary": "#5a003c", + "secondary-container": "#b85088", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#ffc0dc", + "secondary-fixed-dim": "#ffabd2", + "on-secondary-fixed": "#230014", + "on-secondary-fixed-variant": "#670845", + "tertiary": "#bbafff", + "tertiary-dim": "#ac9eff", + "on-tertiary": "#2b1082", + "tertiary-container": "#9f8ffc", + "on-tertiary-container": "#100045", + "tertiary-fixed": "#b3a5ff", + "tertiary-fixed-dim": "#a595ff", + "on-tertiary-fixed": "#000000", + "on-tertiary-fixed-variant": "#170059", + "error": "#ff9f99", + "error-dim": "#ff8882", + "on-error": "#60000a", + "error-container": "#d7383b", + "on-error-container": "#ffffff", + "success": "#5ace94", + "on-success": "#00341e", + "success-container": "#008656", + "on-success-container": "#ffffff", + "warning": "#f3b31e", + "on-warning": "#412d00", + "warning-container": "#e4a604", + "on-warning-container": "#332200", + "info": "#98b8ff", + "on-info": "#002a62", + "info-container": "#006fef", + "on-info-container": "#ffffff", + "inverse-error": "#850012", + "inverse-success": "#00492d", + "inverse-warning": "#543b00", + "inverse-info": "#003c87" + } + }, + "high": { + "light": { + "background": "#fff4f6", + "on-background": "#000000", + "surface": "#fff4f6", + "surface-dim": "#ffc4de", + "surface-bright": "#fff4f6", + "surface-container-lowest": "#ffffff", + "surface-container-low": "#ffecf2", + "surface-container": "#ffe0ec", + "surface-container-high": "#ffd8e8", + "surface-container-highest": "#ffd0e4", + "on-surface": "#000000", + "on-surface-variant": "#371226", + "outline": "#5d3247", + "outline-variant": "#6e4057", + "inverse-surface": "#220215", + "inverse-on-surface": "#ffffff", + "primary": "#46001b", + "primary-dim": "#340012", + "on-primary": "#ffc6d1", + "primary-container": "#9c0947", + "on-primary-container": "#ffffff", + "primary-fixed": "#9c0947", + "primary-fixed-dim": "#89003c", + "on-primary-fixed": "#ffffff", + "on-primary-fixed-variant": "#ffffff", + "inverse-primary": "#ffafc0", + "secondary": "#44002c", + "secondary-dim": "#32001f", + "on-secondary": "#ffc4de", + "secondary-container": "#892961", + "on-secondary-container": "#ffffff", + "secondary-fixed": "#892961", + "secondary-fixed-dim": "#7a1c55", + "on-secondary-fixed": "#ffffff", + "on-secondary-fixed-variant": "#ffffff", + "tertiary": "#1e006d", + "tertiary-dim": "#150052", + "on-tertiary": "#d7cfff", + "tertiary-container": "#4f3da6", + "on-tertiary-container": "#ffffff", + "tertiary-fixed": "#4f3da6", + "tertiary-fixed-dim": "#43309a", + "on-tertiary-fixed": "#ffffff", + "on-tertiary-fixed-variant": "#ffffff", + "error": "#480005", + "error-dim": "#350003", + "on-error": "#ffc7c3", + "error-container": "#a0071a", + "on-error-container": "#ffffff", + "success": "#002515", + "on-success": "#78eaaf", + "success-container": "#005b39", + "on-success-container": "#ffffff", + "warning": "#2c1d00", + "on-warning": "#ffcd6f", + "warning-container": "#684900", + "on-warning-container": "#ffffff", + "info": "#001e4a", + "on-info": "#c3d4ff", + "info-container": "#004ba5", + "on-info-container": "#ffffff", + "inverse-error": "#ffdedb", + "inverse-success": "#89fcbf", + "inverse-warning": "#ffe2b1", + "inverse-info": "#dde5ff" + }, + "dark": { + "background": "#220215", + "on-background": "#ffffff", + "surface": "#220215", + "surface-dim": "#220215", + "surface-bright": "#4e1737", + "surface-container-lowest": "#000000", + "surface-container-low": "#2a041b", + "surface-container": "#330822", + "surface-container-high": "#3c0d28", + "surface-container-highest": "#45122f", + "on-surface": "#ffffff", + "on-surface-variant": "#ffdcea", + "outline": "#e3a8c2", + "outline-variant": "#cc94ad", + "inverse-surface": "#fff8f8", + "inverse-on-surface": "#000000", + "primary": "#ffdde2", + "primary-dim": "#ffc6d1", + "on-primary": "#5e0027", + "primary-container": "#ff779c", + "on-primary-container": "#000000", + "primary-fixed": "#ff779c", + "primary-fixed-dim": "#fd5d8d", + "on-primary-fixed": "#000000", + "on-primary-fixed-variant": "#000000", + "inverse-primary": "#740032", + "secondary": "#ffdcea", + "secondary-dim": "#ffc5de", + "on-secondary": "#5a003c", + "secondary-container": "#f07eb9", + "on-secondary-container": "#000000", + "secondary-fixed": "#ffc0dc", + "secondary-fixed-dim": "#ffabd2", + "on-secondary-fixed": "#000000", + "on-secondary-fixed-variant": "#230014", + "tertiary": "#e8e2ff", + "tertiary-dim": "#d7cfff", + "on-tertiary": "#2b1082", + "tertiary-container": "#a595ff", + "on-tertiary-container": "#000000", + "tertiary-fixed": "#b3a5ff", + "tertiary-fixed-dim": "#a595ff", + "on-tertiary-fixed": "#000000", + "on-tertiary-fixed-variant": "#000000", + "error": "#ffdedb", + "error-dim": "#ffc7c3", + "on-error": "#60000a", + "error-container": "#ff7c76", + "on-error-container": "#000000", + "success": "#89fcbf", + "on-success": "#00341e", + "success-container": "#42b880", + "on-success-container": "#000000", + "warning": "#ffe2b1", + "on-warning": "#3c2900", + "warning-container": "#e4a604", + "on-warning-container": "#000000", + "info": "#dde5ff", + "on-info": "#002a62", + "info-container": "#74a2ff", + "on-info-container": "#000000", + "inverse-error": "#480005", + "inverse-success": "#002515", + "inverse-warning": "#2c1d00", + "inverse-info": "#001e4a" + } + } + }, "light": { "background": "#fff4f6", "on-background": "#492136", @@ -477,22 +1577,22 @@ "on-error": "#ffefee", "error-container": "#fb5151", "on-error-container": "#570008", - "success": "#006c45", - "on-success": "#ffffff", + "success": "#006943", + "on-success": "#caffdd", "success-container": "#86f9bc", - "on-success-container": "#002112", - "warning": "#7c5800", - "on-warning": "#ffffff", - "warning-container": "#ffdea6", - "on-warning-container": "#271900", - "info": "#005ac4", - "on-info": "#ffffff", - "info-container": "#d8e2ff", - "on-info-container": "#001a42", + "on-success-container": "#00734a", + "warning": "#785500", + "on-warning": "#fff1dd", + "warning-container": "#fab925", + "on-warning-container": "#6a4b00", + "info": "#0057be", + "on-info": "#f0f2ff", + "info-container": "#1c7afc", + "on-info-container": "#001435", "inverse-error": "#ff716c", - "inverse-success": "#69dca1", - "inverse-warning": "#fdbb28", - "inverse-info": "#aec6ff" + "inverse-success": "#3bb27b", + "inverse-warning": "#f3b31e", + "inverse-info": "#699cff" }, "dark": { "background": "#220215", @@ -544,22 +1644,22 @@ "on-error": "#490006", "error-container": "#9f0519", "on-error-container": "#ffa8a3", - "success": "#69dca1", - "on-success": "#003822", - "success-container": "#005233", - "on-success-container": "#86f9bc", - "warning": "#fdbb28", - "on-warning": "#412d00", - "warning-container": "#5e4200", - "on-warning-container": "#ffdea6", - "info": "#aec6ff", - "on-info": "#002e6a", - "info-container": "#004396", - "on-info-container": "#d8e2ff", + "success": "#3bb27b", + "on-success": "#002615", + "success-container": "#059460", + "on-success-container": "#001e10", + "warning": "#f3b31e", + "on-warning": "#4e3600", + "warning-container": "#e4a604", + "on-warning-container": "#593f00", + "info": "#699cff", + "on-info": "#001e4b", + "info-container": "#0c74f6", + "on-info-container": "#000a23", "inverse-error": "#b31b25", - "inverse-success": "#006c45", - "inverse-warning": "#7c5800", - "inverse-info": "#005ac4" + "inverse-success": "#006943", + "inverse-warning": "#785500", + "inverse-info": "#0057be" } } }