@dryui/theme-wizard 4.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/dist/actions.d.ts +0 -4
- package/dist/actions.js +0 -9
- package/dist/components/AlphaSlider.svelte +0 -13
- package/dist/components/AlphaSlider.svelte.d.ts +0 -9
- package/dist/components/ContrastBadge.svelte +0 -22
- package/dist/components/ContrastBadge.svelte.d.ts +0 -8
- package/dist/components/HsbPicker.svelte +0 -304
- package/dist/components/HsbPicker.svelte.d.ts +0 -9
- package/dist/components/StepIndicator.svelte +0 -87
- package/dist/components/StepIndicator.svelte.d.ts +0 -7
- package/dist/components/TokenPreview.svelte +0 -55
- package/dist/components/TokenPreview.svelte.d.ts +0 -8
- package/dist/components/WizardShell.svelte +0 -140
- package/dist/components/WizardShell.svelte.d.ts +0 -15
- package/dist/engine/derivation.d.ts +0 -282
- package/dist/engine/derivation.js +0 -1445
- package/dist/engine/derivation.test.d.ts +0 -1
- package/dist/engine/derivation.test.js +0 -956
- package/dist/engine/export-css.d.ts +0 -32
- package/dist/engine/export-css.js +0 -90
- package/dist/engine/export-css.test.d.ts +0 -1
- package/dist/engine/export-css.test.js +0 -78
- package/dist/engine/index.d.ts +0 -10
- package/dist/engine/index.js +0 -6
- package/dist/engine/palette.d.ts +0 -16
- package/dist/engine/palette.js +0 -44
- package/dist/engine/presets.d.ts +0 -13
- package/dist/engine/presets.js +0 -124
- package/dist/engine/url-codec.d.ts +0 -53
- package/dist/engine/url-codec.js +0 -243
- package/dist/engine/url-codec.test.d.ts +0 -1
- package/dist/engine/url-codec.test.js +0 -137
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -19
- package/dist/state.svelte.d.ts +0 -104
- package/dist/state.svelte.js +0 -574
- package/dist/steps/BrandColor.svelte +0 -216
- package/dist/steps/BrandColor.svelte.d.ts +0 -6
- package/dist/steps/Personality.svelte +0 -319
- package/dist/steps/Personality.svelte.d.ts +0 -3
- package/dist/steps/PreviewExport.svelte +0 -115
- package/dist/steps/PreviewExport.svelte.d.ts +0 -9
- package/dist/steps/Shape.svelte +0 -121
- package/dist/steps/Shape.svelte.d.ts +0 -18
- package/dist/steps/Typography.svelte +0 -115
- package/dist/steps/Typography.svelte.d.ts +0 -18
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { useThemeOverride } from '@dryui/primitives/use-theme-override';
|
|
4
|
-
import { Text } from '@dryui/ui/text';
|
|
5
|
-
import { Button } from '@dryui/ui/button';
|
|
6
|
-
import { getAllTokens, wizardState } from '../state.svelte.js';
|
|
7
|
-
import StepIndicator from './StepIndicator.svelte';
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
title: string;
|
|
11
|
-
subtitle?: string;
|
|
12
|
-
step: number;
|
|
13
|
-
children: Snippet;
|
|
14
|
-
onback?: () => void;
|
|
15
|
-
onnext?: () => void;
|
|
16
|
-
nextLabel?: string;
|
|
17
|
-
backLabel?: string;
|
|
18
|
-
onstep?: (step: number) => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
let {
|
|
22
|
-
title,
|
|
23
|
-
subtitle,
|
|
24
|
-
step,
|
|
25
|
-
children,
|
|
26
|
-
onback,
|
|
27
|
-
onnext,
|
|
28
|
-
nextLabel = 'Next',
|
|
29
|
-
backLabel = 'Back',
|
|
30
|
-
onstep
|
|
31
|
-
}: Props = $props();
|
|
32
|
-
|
|
33
|
-
useThemeOverride(() => getAllTokens());
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<div class="wizard-shell">
|
|
37
|
-
<header class="wizard-header">
|
|
38
|
-
<div class="wizard-header-inner">
|
|
39
|
-
<Text size="lg" weight="semibold">Theme Wizard</Text>
|
|
40
|
-
<StepIndicator currentStep={step} {...onstep ? { onstep } : {}} />
|
|
41
|
-
</div>
|
|
42
|
-
</header>
|
|
43
|
-
|
|
44
|
-
<main class="wizard-main">
|
|
45
|
-
<div class="wizard-content">
|
|
46
|
-
<div class="wizard-title">
|
|
47
|
-
<span class="wizard-step-heading">{title}</span>
|
|
48
|
-
{#if subtitle}
|
|
49
|
-
<Text as="p" color="muted">{subtitle}</Text>
|
|
50
|
-
{/if}
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
{@render children()}
|
|
54
|
-
</div>
|
|
55
|
-
</main>
|
|
56
|
-
|
|
57
|
-
<footer class="wizard-footer">
|
|
58
|
-
<div class="wizard-footer-inner">
|
|
59
|
-
{#if onback}
|
|
60
|
-
<Button variant="ghost" onclick={onback}>← {backLabel}</Button>
|
|
61
|
-
{/if}
|
|
62
|
-
{#if onnext}
|
|
63
|
-
<Button variant="solid" onclick={onnext}>{nextLabel} →</Button>
|
|
64
|
-
{/if}
|
|
65
|
-
</div>
|
|
66
|
-
</footer>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<style>
|
|
70
|
-
.wizard-shell {
|
|
71
|
-
display: grid;
|
|
72
|
-
grid-template-rows: auto 1fr auto;
|
|
73
|
-
min-height: 100dvh;
|
|
74
|
-
color: var(--dry-color-text-strong);
|
|
75
|
-
background-color: var(--dry-color-bg-base);
|
|
76
|
-
transition: background-color 0.4s ease;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.wizard-header {
|
|
80
|
-
display: grid;
|
|
81
|
-
grid-template-columns: minmax(0, 64rem);
|
|
82
|
-
justify-content: center;
|
|
83
|
-
padding: var(--dry-space-4) var(--dry-space-6);
|
|
84
|
-
border-bottom: 1px solid var(--dry-app-bar-border, var(--dry-color-stroke-weak));
|
|
85
|
-
background: var(--dry-app-bar-bg, var(--dry-color-bg-base));
|
|
86
|
-
box-shadow: var(--dry-app-bar-shadow, none);
|
|
87
|
-
transition:
|
|
88
|
-
border-color 0.3s ease,
|
|
89
|
-
background 0.3s ease,
|
|
90
|
-
box-shadow 0.3s ease;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.wizard-header-inner {
|
|
94
|
-
display: grid;
|
|
95
|
-
grid-template-columns: auto 1fr;
|
|
96
|
-
align-items: center;
|
|
97
|
-
gap: var(--dry-space-6);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.wizard-main {
|
|
101
|
-
display: grid;
|
|
102
|
-
grid-template-columns: minmax(0, 48rem);
|
|
103
|
-
justify-content: center;
|
|
104
|
-
align-content: start;
|
|
105
|
-
padding: var(--dry-space-10) var(--dry-space-6);
|
|
106
|
-
overflow-y: auto;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.wizard-content {
|
|
110
|
-
display: grid;
|
|
111
|
-
gap: var(--dry-space-10);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.wizard-title {
|
|
115
|
-
display: grid;
|
|
116
|
-
gap: var(--dry-space-3);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.wizard-step-heading {
|
|
120
|
-
font-family: var(--dry-font-mono);
|
|
121
|
-
font-size: clamp(1.75rem, 3vw, 2.5rem);
|
|
122
|
-
letter-spacing: 0.02em;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.wizard-footer {
|
|
126
|
-
display: grid;
|
|
127
|
-
grid-template-columns: minmax(0, 48rem);
|
|
128
|
-
justify-content: center;
|
|
129
|
-
padding: var(--dry-space-4) var(--dry-space-6);
|
|
130
|
-
border-top: 1px solid var(--dry-app-bar-border, var(--dry-color-stroke-weak));
|
|
131
|
-
transition: border-color 0.3s ease;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.wizard-footer-inner {
|
|
135
|
-
display: grid;
|
|
136
|
-
grid-auto-flow: column;
|
|
137
|
-
grid-auto-columns: max-content;
|
|
138
|
-
gap: var(--dry-space-3);
|
|
139
|
-
}
|
|
140
|
-
</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
interface Props {
|
|
3
|
-
title: string;
|
|
4
|
-
subtitle?: string;
|
|
5
|
-
step: number;
|
|
6
|
-
children: Snippet;
|
|
7
|
-
onback?: () => void;
|
|
8
|
-
onnext?: () => void;
|
|
9
|
-
nextLabel?: string;
|
|
10
|
-
backLabel?: string;
|
|
11
|
-
onstep?: (step: number) => void;
|
|
12
|
-
}
|
|
13
|
-
declare const WizardShell: import("svelte").Component<Props, {}, "">;
|
|
14
|
-
type WizardShell = ReturnType<typeof WizardShell>;
|
|
15
|
-
export default WizardShell;
|
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* derivation.ts — Color Derivation Engine
|
|
3
|
-
*
|
|
4
|
-
* Pure functions, zero UI dependencies.
|
|
5
|
-
* HSB-first approach: brand input is always HSB (Hue/Saturation/Brightness).
|
|
6
|
-
*/
|
|
7
|
-
export interface HSL {
|
|
8
|
-
h: number;
|
|
9
|
-
s: number;
|
|
10
|
-
l: number;
|
|
11
|
-
}
|
|
12
|
-
export interface HSB {
|
|
13
|
-
h: number;
|
|
14
|
-
s: number;
|
|
15
|
-
b: number;
|
|
16
|
-
}
|
|
17
|
-
export interface BrandInput {
|
|
18
|
-
h: number;
|
|
19
|
-
s: number;
|
|
20
|
-
b: number;
|
|
21
|
-
}
|
|
22
|
-
export interface ThemeOptions {
|
|
23
|
-
neutralMode?: 'monochromatic' | 'neutral';
|
|
24
|
-
brandCandidates?: BrandInput[];
|
|
25
|
-
statusHues?: {
|
|
26
|
-
error?: number;
|
|
27
|
-
warning?: number;
|
|
28
|
-
success?: number;
|
|
29
|
-
info?: number;
|
|
30
|
-
};
|
|
31
|
-
darkBg?: {
|
|
32
|
-
base?: string;
|
|
33
|
-
raised?: string;
|
|
34
|
-
overlay?: string;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export interface ThemeTokens {
|
|
38
|
-
light: Record<string, string>;
|
|
39
|
-
dark: Record<string, string>;
|
|
40
|
-
}
|
|
41
|
-
export type SystemTone = 'error' | 'warning' | 'success' | 'info';
|
|
42
|
-
export interface ThemeReference {
|
|
43
|
-
source: string;
|
|
44
|
-
value: string;
|
|
45
|
-
}
|
|
46
|
-
export interface ThemeModeLadder<T> {
|
|
47
|
-
light: T;
|
|
48
|
-
dark: T;
|
|
49
|
-
}
|
|
50
|
-
export interface TransparentNeutralLadder {
|
|
51
|
-
textStrong: string;
|
|
52
|
-
textWeak: string;
|
|
53
|
-
icon: string;
|
|
54
|
-
strokeStrong: string;
|
|
55
|
-
strokeWeak: string;
|
|
56
|
-
fill: string;
|
|
57
|
-
fillHover: string;
|
|
58
|
-
fillActive: string;
|
|
59
|
-
}
|
|
60
|
-
export interface TransparentBrandLadder {
|
|
61
|
-
brand: string;
|
|
62
|
-
text: string;
|
|
63
|
-
fill: string;
|
|
64
|
-
fillHover: string;
|
|
65
|
-
fillActive: string;
|
|
66
|
-
fillWeak: string;
|
|
67
|
-
stroke: string;
|
|
68
|
-
on: string;
|
|
69
|
-
focusRing: string;
|
|
70
|
-
}
|
|
71
|
-
export interface TransparentToneLadder {
|
|
72
|
-
text: string;
|
|
73
|
-
fill: string;
|
|
74
|
-
fillHover: string;
|
|
75
|
-
fillWeak: string;
|
|
76
|
-
stroke: string;
|
|
77
|
-
on: string;
|
|
78
|
-
}
|
|
79
|
-
export interface TransparentPrimitiveLadders {
|
|
80
|
-
neutral: ThemeModeLadder<TransparentNeutralLadder>;
|
|
81
|
-
brand: ThemeModeLadder<TransparentBrandLadder>;
|
|
82
|
-
system: Record<SystemTone, ThemeModeLadder<TransparentToneLadder>>;
|
|
83
|
-
}
|
|
84
|
-
export interface LiteralTransparentNeutralLadder {
|
|
85
|
-
'1000': string;
|
|
86
|
-
'700': string;
|
|
87
|
-
'500': string;
|
|
88
|
-
'100': string;
|
|
89
|
-
'50': string;
|
|
90
|
-
'25': string;
|
|
91
|
-
}
|
|
92
|
-
export interface LiteralTransparentToneLadder {
|
|
93
|
-
'1000': string;
|
|
94
|
-
'800': string;
|
|
95
|
-
'200': string;
|
|
96
|
-
'50': string;
|
|
97
|
-
}
|
|
98
|
-
export interface LiteralTransparentPrimitiveLadders {
|
|
99
|
-
neutral: ThemeModeLadder<LiteralTransparentNeutralLadder>;
|
|
100
|
-
brand: ThemeModeLadder<LiteralTransparentToneLadder>;
|
|
101
|
-
system: Record<SystemTone, ThemeModeLadder<LiteralTransparentToneLadder>>;
|
|
102
|
-
}
|
|
103
|
-
export interface SolidSurfaceSteps {
|
|
104
|
-
'1000'?: string;
|
|
105
|
-
'900'?: string;
|
|
106
|
-
'850'?: string;
|
|
107
|
-
'800'?: string;
|
|
108
|
-
'50'?: string;
|
|
109
|
-
'0'?: string;
|
|
110
|
-
}
|
|
111
|
-
export interface SolidSurfaceRoles {
|
|
112
|
-
sunken: string;
|
|
113
|
-
base: string;
|
|
114
|
-
raised?: string;
|
|
115
|
-
overlay?: string;
|
|
116
|
-
}
|
|
117
|
-
export interface SolidSurfacePalette {
|
|
118
|
-
steps: SolidSurfaceSteps;
|
|
119
|
-
roles: SolidSurfaceRoles;
|
|
120
|
-
}
|
|
121
|
-
export interface SolidPrimitiveLadders {
|
|
122
|
-
grey: ThemeModeLadder<SolidSurfacePalette>;
|
|
123
|
-
yellow: ThemeModeLadder<{
|
|
124
|
-
'1000': string;
|
|
125
|
-
}>;
|
|
126
|
-
}
|
|
127
|
-
export interface InteractiveStateRecipe {
|
|
128
|
-
baseFill: string;
|
|
129
|
-
hoverOverlay: string;
|
|
130
|
-
activeOverlay: string;
|
|
131
|
-
focusRing: string;
|
|
132
|
-
label: string;
|
|
133
|
-
stroke: string;
|
|
134
|
-
disabledFill: string;
|
|
135
|
-
disabledLabel: string;
|
|
136
|
-
disabledStroke: string;
|
|
137
|
-
}
|
|
138
|
-
export interface InteractionStateRecipes {
|
|
139
|
-
neutral: ThemeModeLadder<InteractiveStateRecipe>;
|
|
140
|
-
brand: ThemeModeLadder<InteractiveStateRecipe>;
|
|
141
|
-
system: Record<SystemTone, ThemeModeLadder<InteractiveStateRecipe>>;
|
|
142
|
-
}
|
|
143
|
-
export interface BrandCandidateAssessment {
|
|
144
|
-
id: string;
|
|
145
|
-
label: string;
|
|
146
|
-
input: BrandInput;
|
|
147
|
-
resolvedInput: BrandInput;
|
|
148
|
-
usesHueFallback: boolean;
|
|
149
|
-
lightFill: string;
|
|
150
|
-
darkFill: string;
|
|
151
|
-
lightContrast: number;
|
|
152
|
-
darkContrast: number;
|
|
153
|
-
minContrast: number;
|
|
154
|
-
statusConflict: SystemTone | 'warning' | null;
|
|
155
|
-
score: number;
|
|
156
|
-
role: 'interactive' | 'decorative';
|
|
157
|
-
}
|
|
158
|
-
export interface BrandPolicy {
|
|
159
|
-
candidates: BrandCandidateAssessment[];
|
|
160
|
-
raw: BrandCandidateAssessment;
|
|
161
|
-
interactive: BrandCandidateAssessment;
|
|
162
|
-
multipleBrand: boolean;
|
|
163
|
-
fallbackTriggered: boolean;
|
|
164
|
-
statusConflictResolved: boolean;
|
|
165
|
-
}
|
|
166
|
-
export interface ThemeAuditCheck extends ForegroundSurfaceAssessment {
|
|
167
|
-
id: string;
|
|
168
|
-
label: string;
|
|
169
|
-
kind: 'text' | 'stroke' | 'shape';
|
|
170
|
-
contrastThreshold: number;
|
|
171
|
-
apcaThreshold: number;
|
|
172
|
-
passes: boolean;
|
|
173
|
-
}
|
|
174
|
-
export interface ThemeAudit {
|
|
175
|
-
contextChecks: ThemeAuditCheck[];
|
|
176
|
-
allPass: boolean;
|
|
177
|
-
}
|
|
178
|
-
export interface PhotoTemperatureGuidance {
|
|
179
|
-
temperature: 'warm' | 'cool' | 'neutral';
|
|
180
|
-
recommendation: string;
|
|
181
|
-
accentDirection: string;
|
|
182
|
-
}
|
|
183
|
-
export interface ThemeModelLayer {
|
|
184
|
-
light: Record<string, ThemeReference>;
|
|
185
|
-
dark: Record<string, ThemeReference>;
|
|
186
|
-
}
|
|
187
|
-
export interface ThemeModel {
|
|
188
|
-
primitives: ThemeTokens;
|
|
189
|
-
transparentPrimitives: TransparentPrimitiveLadders;
|
|
190
|
-
literalTransparentPrimitives: LiteralTransparentPrimitiveLadders;
|
|
191
|
-
solidPrimitives: SolidPrimitiveLadders;
|
|
192
|
-
interactionStates: InteractionStateRecipes;
|
|
193
|
-
brandPolicy: BrandPolicy;
|
|
194
|
-
audit: ThemeAudit;
|
|
195
|
-
photoGuidance: PhotoTemperatureGuidance;
|
|
196
|
-
_theme: ThemeModelLayer;
|
|
197
|
-
semantic: ThemeModelLayer;
|
|
198
|
-
tokens: ThemeTokens;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Convert HSB (Hue/Saturation/Brightness) to HSL.
|
|
202
|
-
* h: 0–360, s: 0–1, b: 0–1
|
|
203
|
-
* Returns { h: 0–360, s: 0–1, l: 0–1 }
|
|
204
|
-
*/
|
|
205
|
-
export declare function hsbToHsl(h: number, s: number, b: number): HSL;
|
|
206
|
-
/**
|
|
207
|
-
* Convert HSL to HSB.
|
|
208
|
-
* h: 0–360, s: 0–1, l: 0–1
|
|
209
|
-
* Returns { h: 0–360, s: 0–1, b: 0–1 }
|
|
210
|
-
*/
|
|
211
|
-
export declare function hslToHsb(h: number, s: number, l: number): HSB;
|
|
212
|
-
/**
|
|
213
|
-
* Convert HSL to RGB.
|
|
214
|
-
* h: 0–360, s: 0–1, l: 0–1
|
|
215
|
-
* Returns [r, g, b] each 0–255
|
|
216
|
-
*/
|
|
217
|
-
export declare function hslToRgb(h: number, s: number, l: number): [number, number, number];
|
|
218
|
-
/**
|
|
219
|
-
* Convert HSL to hex string (#rrggbb).
|
|
220
|
-
* h: 0–360, s: 0–1, l: 0–1
|
|
221
|
-
*/
|
|
222
|
-
export declare function hslToHex(h: number, s: number, l: number): string;
|
|
223
|
-
/**
|
|
224
|
-
* Convert hex string (#rrggbb) to HSL.
|
|
225
|
-
*/
|
|
226
|
-
export declare function hexToHsl(hex: string): HSL;
|
|
227
|
-
export declare function cssColorToRgb(color: string): [number, number, number] | null;
|
|
228
|
-
/**
|
|
229
|
-
* Compute relative luminance from linear RGB channels (each 0–255).
|
|
230
|
-
* Per WCAG 2.1.
|
|
231
|
-
*/
|
|
232
|
-
export declare function relativeLuminance(r: number, g: number, b: number): number;
|
|
233
|
-
/**
|
|
234
|
-
* Compute WCAG contrast ratio from two luminance values.
|
|
235
|
-
* Returns a value between 1 and 21.
|
|
236
|
-
*/
|
|
237
|
-
export declare function contrastRatio(lum1: number, lum2: number): number;
|
|
238
|
-
/**
|
|
239
|
-
* Check if two luminance values meet a contrast threshold.
|
|
240
|
-
*/
|
|
241
|
-
export declare function meetsContrast(lum1: number, lum2: number, threshold: number): boolean;
|
|
242
|
-
/**
|
|
243
|
-
* Compute relative luminance from HSL values.
|
|
244
|
-
* h: 0–360, s: 0–1, l: 0–1
|
|
245
|
-
*/
|
|
246
|
-
export declare function luminanceFromHsl(h: number, s: number, l: number): number;
|
|
247
|
-
export declare function contrastBetweenCssColors(first: string, second: string): number | null;
|
|
248
|
-
export interface ForegroundSurfaceThresholds {
|
|
249
|
-
contrast?: number;
|
|
250
|
-
apca?: number;
|
|
251
|
-
}
|
|
252
|
-
export interface ForegroundSurfaceAssessment {
|
|
253
|
-
foreground: string;
|
|
254
|
-
surface: string;
|
|
255
|
-
contrast: number | null;
|
|
256
|
-
apca: number | null;
|
|
257
|
-
apcaMagnitude: number | null;
|
|
258
|
-
passesContrast: boolean;
|
|
259
|
-
passesApca: boolean;
|
|
260
|
-
}
|
|
261
|
-
export interface ForegroundSurfaceComparison {
|
|
262
|
-
foreground: string;
|
|
263
|
-
assessments: ForegroundSurfaceAssessment[];
|
|
264
|
-
contrastSpread: number | null;
|
|
265
|
-
apcaMagnitudeSpread: number | null;
|
|
266
|
-
}
|
|
267
|
-
export declare function measureForegroundOnSurface(foreground: string, surface: string, thresholds?: ForegroundSurfaceThresholds): ForegroundSurfaceAssessment;
|
|
268
|
-
export declare function compareForegroundAcrossSurfaces(foreground: string, surfaces: readonly string[], thresholds?: ForegroundSurfaceThresholds): ForegroundSurfaceComparison;
|
|
269
|
-
export declare function apcaSrgbToY(rgb: [number, number, number]): number;
|
|
270
|
-
export declare function apcaContrast(textY: number, backgroundY: number): number;
|
|
271
|
-
export declare function apcaContrastBetweenCssColors(text: string, background: string): number | null;
|
|
272
|
-
export declare function meetsApca(lc: number | null, threshold: number): boolean;
|
|
273
|
-
export declare function generateThemeModel(brand: BrandInput, options?: ThemeOptions): ThemeModel;
|
|
274
|
-
/**
|
|
275
|
-
* Generate a complete design token set for light and dark modes
|
|
276
|
-
* from a brand color specified in HSB.
|
|
277
|
-
*
|
|
278
|
-
* @param brand.h Hue, 0–360
|
|
279
|
-
* @param brand.s Saturation, 0–100
|
|
280
|
-
* @param brand.b Brightness, 0–100
|
|
281
|
-
*/
|
|
282
|
-
export declare function generateTheme(brand: BrandInput, options?: ThemeOptions): ThemeTokens;
|