@oxyhq/bloom 0.74.1 → 0.74.2
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/lib/commonjs/theme/color-policy.js +22 -8
- package/lib/commonjs/theme/color-policy.js.map +1 -1
- package/lib/module/theme/color-policy.js +22 -8
- package/lib/module/theme/color-policy.js.map +1 -1
- package/lib/typescript/commonjs/theme/color-policy.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-policy.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +52 -52
- package/src/theme/__tests__/__snapshots__/visual-gallery.test.tsx.snap +52 -52
- package/src/theme/__tests__/policy-legibility.test.ts +20 -0
- package/src/theme/color-policy.ts +22 -9
|
@@ -87,9 +87,21 @@ const noLegibleForeground = argb => contrastOf(argb, true) < AA && contrastOf(ar
|
|
|
87
87
|
/** The tone a white-label fill sits at in LIGHT mode. */
|
|
88
88
|
const LIGHT_FILL_TONE = 45;
|
|
89
89
|
|
|
90
|
-
/** No dark-mode fill sits below this: under it a colour goes heavy on black. */
|
|
90
|
+
/** No dark-mode BRAND fill sits below this: under it a colour goes heavy on black. */
|
|
91
91
|
const DARK_FLOOR = 58;
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Accent fills stop here in dark, and the ceiling is not aesthetic.
|
|
95
|
+
*
|
|
96
|
+
* White text needs a fill at or below tone 49, and an accent is a BUTTON — the
|
|
97
|
+
* FAB, the compose action — where white on colour is the convention. Sitting the
|
|
98
|
+
* accent at its hue's peak tone makes a lime look like lime, but peaks live at
|
|
99
|
+
* tone 88 for that family, and no label survives up there except black. The hue
|
|
100
|
+
* work still stands (a magenta seed's accent is the lime family, not the emerald
|
|
101
|
+
* one it used to be); only its brightness is capped so the label can be white.
|
|
102
|
+
*/
|
|
103
|
+
const DARK_ACCENT_TONE = 49;
|
|
104
|
+
|
|
93
105
|
/** Chroma ceiling for an accent FILL — the brand palette's own maximum, not the gamut's. */
|
|
94
106
|
const ACCENT_CHROMA = 80;
|
|
95
107
|
|
|
@@ -277,13 +289,15 @@ function buildPolicyTokens(seedHex, isDark, roles, pinned = {}) {
|
|
|
277
289
|
// analyzer runs there — Bloom ships it yet only reaches it on the fidelity
|
|
278
290
|
// path, which no Bloom variant uses, so a rotated accent could land in the
|
|
279
291
|
// band with nothing to lift it out.
|
|
280
|
-
//
|
|
281
|
-
//
|
|
282
|
-
//
|
|
283
|
-
//
|
|
284
|
-
//
|
|
285
|
-
//
|
|
286
|
-
|
|
292
|
+
// Bloom's own tone policy governs this, and M3's `fixIfDisliked` deliberately
|
|
293
|
+
// does not get a say. That heuristic flags dark yellow-greens and lifts them
|
|
294
|
+
// to tone 70 — a remedy calibrated for M3's tone assignments, where nothing
|
|
295
|
+
// depends on staying under the ceiling white text needs. Here everything does:
|
|
296
|
+
// a 25-tone lift puts the fill above it and flips a compose button's label to
|
|
297
|
+
// black. The accent chroma cap already keeps these hues out of neon territory,
|
|
298
|
+
// and the hue itself is the caller's brand rather than ours to move. The
|
|
299
|
+
// analyzer still runs where it was designed to, inside `color-roles`.
|
|
300
|
+
const tone = isDark ? DARK_ACCENT_TONE : LIGHT_FILL_TONE;
|
|
287
301
|
const pair = fillPair(fillPalette, tone);
|
|
288
302
|
tokens[`--${role}`] = pair.fill;
|
|
289
303
|
tokens[`--${role}-foreground`] = pair.foreground;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_index","require","_hct","_tonalPalette","_colorUtils","STATUS_SEEDS","exports","success","error","warning","info","AA","rgb","argb","redFromArgb","greenFromArgb","blueFromArgb","rgba","alpha","contrastOf","onWhite","channel","v","c","Math","pow","luminance","foregroundFor","noLegibleForeground","LIGHT_FILL_TONE","DARK_FLOOR","ACCENT_CHROMA","TEXT_TONE","light","dark","TEXT_CHROMA","SUBTLE_SOURCE_TONE","SUBTLE_ALPHA","SPLIT_ROTATIONS","VIVID_SNAP_WINDOW","VIVID_SNAP_MIN_GAIN","MIN_ACCENT_SEPARATION","DESTRUCTIVE_PROXIMITY","hueDistance","a","b","d","abs","min","peakTone","hue","palette","TonalPalette","fromHueAndChroma","bestTone","bestChroma","tone","chroma","Hct","fromInt","peakChroma","vividHueNear","baseChroma","bestHue","delta","candidate","fillPair","startTone","fill","foreground","accentHues","seedHue","firstRotation","secondRotation","geometricA","geometricB","geometricStandout","quiet","snapped","standout","errorHue","argbFromHex","secondary","tertiary","buildPolicyTokens","seedHex","isDark","roles","pinned","seed","brandPalette","primary","max","tokens","surfaceContainer","surfaceContainerLowest","surfaceContainerHigh","onSurfaceVariant","hues","role","pin","undefined","fillPalette","textPalette","vividPalette","pair","i","hex","Object","entries","status"],"sourceRoot":"../../../src","sources":["theme/color-policy.ts"],"mappings":";;;;;;;AAwBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;
|
|
1
|
+
{"version":3,"names":["_index","require","_hct","_tonalPalette","_colorUtils","STATUS_SEEDS","exports","success","error","warning","info","AA","rgb","argb","redFromArgb","greenFromArgb","blueFromArgb","rgba","alpha","contrastOf","onWhite","channel","v","c","Math","pow","luminance","foregroundFor","noLegibleForeground","LIGHT_FILL_TONE","DARK_FLOOR","DARK_ACCENT_TONE","ACCENT_CHROMA","TEXT_TONE","light","dark","TEXT_CHROMA","SUBTLE_SOURCE_TONE","SUBTLE_ALPHA","SPLIT_ROTATIONS","VIVID_SNAP_WINDOW","VIVID_SNAP_MIN_GAIN","MIN_ACCENT_SEPARATION","DESTRUCTIVE_PROXIMITY","hueDistance","a","b","d","abs","min","peakTone","hue","palette","TonalPalette","fromHueAndChroma","bestTone","bestChroma","tone","chroma","Hct","fromInt","peakChroma","vividHueNear","baseChroma","bestHue","delta","candidate","fillPair","startTone","fill","foreground","accentHues","seedHue","firstRotation","secondRotation","geometricA","geometricB","geometricStandout","quiet","snapped","standout","errorHue","argbFromHex","secondary","tertiary","buildPolicyTokens","seedHex","isDark","roles","pinned","seed","brandPalette","primary","max","tokens","surfaceContainer","surfaceContainerLowest","surfaceContainerHigh","onSurfaceVariant","hues","role","pin","undefined","fillPalette","textPalette","vividPalette","pair","i","hex","Object","entries","status"],"sourceRoot":"../../../src","sources":["theme/color-policy.ts"],"mappings":";;;;;;;AAwBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AA3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACO,MAAMI,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1BE,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE;AACR,CAAU;;AAEV;;AAMA;;AAGA,MAAMC,EAAE,GAAG,GAAG;AAEd,MAAMC,GAAG,GAAIC,IAAY,IACvB,OAAO,IAAAC,uBAAW,EAACD,IAAI,CAAC,IAAI,IAAAE,yBAAa,EAACF,IAAI,CAAC,IAAI,IAAAG,wBAAY,EAACH,IAAI,CAAC,GAAG;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,IAAI,GAAGA,CAACJ,IAAY,EAAEK,KAAa,KACvC,QAAQ,IAAAJ,uBAAW,EAACD,IAAI,CAAC,KAAK,IAAAE,yBAAa,EAACF,IAAI,CAAC,KAAK,IAAAG,wBAAY,EAACH,IAAI,CAAC,KAAKK,KAAK,GAAG;;AAEvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAACN,IAAY,EAAEO,OAAgB,EAAU;EAC1D,MAAMC,OAAO,GAAIC,CAAS,IAAa;IACrC,MAAMC,CAAC,GAAGD,CAAC,GAAG,GAAG;IACjB,O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M,GAAGjD,YAAY,CAACH,IAAI,GAAGG,YAAY,CAACJ,KAC5C,CAAC;EACH;EAEA,OAAO4D,MAAM;AACf","ignoreList":[]}
|
|
@@ -82,9 +82,21 @@ const noLegibleForeground = argb => contrastOf(argb, true) < AA && contrastOf(ar
|
|
|
82
82
|
/** The tone a white-label fill sits at in LIGHT mode. */
|
|
83
83
|
const LIGHT_FILL_TONE = 45;
|
|
84
84
|
|
|
85
|
-
/** No dark-mode fill sits below this: under it a colour goes heavy on black. */
|
|
85
|
+
/** No dark-mode BRAND fill sits below this: under it a colour goes heavy on black. */
|
|
86
86
|
const DARK_FLOOR = 58;
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Accent fills stop here in dark, and the ceiling is not aesthetic.
|
|
90
|
+
*
|
|
91
|
+
* White text needs a fill at or below tone 49, and an accent is a BUTTON — the
|
|
92
|
+
* FAB, the compose action — where white on colour is the convention. Sitting the
|
|
93
|
+
* accent at its hue's peak tone makes a lime look like lime, but peaks live at
|
|
94
|
+
* tone 88 for that family, and no label survives up there except black. The hue
|
|
95
|
+
* work still stands (a magenta seed's accent is the lime family, not the emerald
|
|
96
|
+
* one it used to be); only its brightness is capped so the label can be white.
|
|
97
|
+
*/
|
|
98
|
+
const DARK_ACCENT_TONE = 49;
|
|
99
|
+
|
|
88
100
|
/** Chroma ceiling for an accent FILL — the brand palette's own maximum, not the gamut's. */
|
|
89
101
|
const ACCENT_CHROMA = 80;
|
|
90
102
|
|
|
@@ -272,13 +284,15 @@ export function buildPolicyTokens(seedHex, isDark, roles, pinned = {}) {
|
|
|
272
284
|
// analyzer runs there — Bloom ships it yet only reaches it on the fidelity
|
|
273
285
|
// path, which no Bloom variant uses, so a rotated accent could land in the
|
|
274
286
|
// band with nothing to lift it out.
|
|
275
|
-
//
|
|
276
|
-
//
|
|
277
|
-
//
|
|
278
|
-
//
|
|
279
|
-
//
|
|
280
|
-
//
|
|
281
|
-
|
|
287
|
+
// Bloom's own tone policy governs this, and M3's `fixIfDisliked` deliberately
|
|
288
|
+
// does not get a say. That heuristic flags dark yellow-greens and lifts them
|
|
289
|
+
// to tone 70 — a remedy calibrated for M3's tone assignments, where nothing
|
|
290
|
+
// depends on staying under the ceiling white text needs. Here everything does:
|
|
291
|
+
// a 25-tone lift puts the fill above it and flips a compose button's label to
|
|
292
|
+
// black. The accent chroma cap already keeps these hues out of neon territory,
|
|
293
|
+
// and the hue itself is the caller's brand rather than ours to move. The
|
|
294
|
+
// analyzer still runs where it was designed to, inside `color-roles`.
|
|
295
|
+
const tone = isDark ? DARK_ACCENT_TONE : LIGHT_FILL_TONE;
|
|
282
296
|
const pair = fillPair(fillPalette, tone);
|
|
283
297
|
tokens[`--${role}`] = pair.fill;
|
|
284
298
|
tokens[`--${role}-foreground`] = pair.foreground;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["argbFromHex","Hct","TonalPalette","blueFromArgb","greenFromArgb","redFromArgb","STATUS_SEEDS","success","error","warning","info","AA","rgb","argb","rgba","alpha","contrastOf","onWhite","channel","v","c","Math","pow","luminance","foregroundFor","noLegibleForeground","LIGHT_FILL_TONE","DARK_FLOOR","ACCENT_CHROMA","TEXT_TONE","light","dark","TEXT_CHROMA","SUBTLE_SOURCE_TONE","SUBTLE_ALPHA","SPLIT_ROTATIONS","VIVID_SNAP_WINDOW","VIVID_SNAP_MIN_GAIN","MIN_ACCENT_SEPARATION","DESTRUCTIVE_PROXIMITY","hueDistance","a","b","d","abs","min","peakTone","hue","palette","fromHueAndChroma","bestTone","bestChroma","tone","chroma","fromInt","peakChroma","vividHueNear","baseChroma","bestHue","delta","candidate","fillPair","startTone","fill","foreground","accentHues","seedHue","firstRotation","secondRotation","geometricA","geometricB","geometricStandout","quiet","snapped","standout","errorHue","secondary","tertiary","buildPolicyTokens","seedHex","isDark","roles","pinned","seed","brandPalette","primary","max","tokens","surfaceContainer","surfaceContainerLowest","surfaceContainerHigh","onSurfaceVariant","hues","role","pin","undefined","fillPalette","textPalette","vividPalette","pair","i","hex","Object","entries","status"],"sourceRoot":"../../../src","sources":["theme/color-policy.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAW,QAAyB,yBAAgB;AAC7D,SAASC,GAAG,QAAQ,uBAAoB;AACxC,SAASC,YAAY,QAAQ,iCAA8B;
|
|
1
|
+
{"version":3,"names":["argbFromHex","Hct","TonalPalette","blueFromArgb","greenFromArgb","redFromArgb","STATUS_SEEDS","success","error","warning","info","AA","rgb","argb","rgba","alpha","contrastOf","onWhite","channel","v","c","Math","pow","luminance","foregroundFor","noLegibleForeground","LIGHT_FILL_TONE","DARK_FLOOR","DARK_ACCENT_TONE","ACCENT_CHROMA","TEXT_TONE","light","dark","TEXT_CHROMA","SUBTLE_SOURCE_TONE","SUBTLE_ALPHA","SPLIT_ROTATIONS","VIVID_SNAP_WINDOW","VIVID_SNAP_MIN_GAIN","MIN_ACCENT_SEPARATION","DESTRUCTIVE_PROXIMITY","hueDistance","a","b","d","abs","min","peakTone","hue","palette","fromHueAndChroma","bestTone","bestChroma","tone","chroma","fromInt","peakChroma","vividHueNear","baseChroma","bestHue","delta","candidate","fillPair","startTone","fill","foreground","accentHues","seedHue","firstRotation","secondRotation","geometricA","geometricB","geometricStandout","quiet","snapped","standout","errorHue","secondary","tertiary","buildPolicyTokens","seedHex","isDark","roles","pinned","seed","brandPalette","primary","max","tokens","surfaceContainer","surfaceContainerLowest","surfaceContainerHigh","onSurfaceVariant","hues","role","pin","undefined","fillPalette","textPalette","vividPalette","pair","i","hex","Object","entries","status"],"sourceRoot":"../../../src","sources":["theme/color-policy.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,WAA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AG,CAAC,CAAC;IAC5C,MAAMrD,OAAO,GAAG/C,YAAY,CAACgD,gBAAgB,CAACuD,MAAM,CAACzD,GAAG,EAAEyD,MAAM,CAACnD,MAAM,CAAC;IACxE,MAAM8C,IAAI,GAAGtC,QAAQ,CAACb,OAAO,EAAEgC,MAAM,GAAG5D,IAAI,CAACkE,GAAG,CAACkB,MAAM,CAACpD,IAAI,EAAE1B,UAAU,CAAC,GAAGD,eAAe,CAAC;IAC5F8D,MAAM,CAAC,KAAKM,IAAI,EAAE,CAAC,GAAGM,IAAI,CAACpC,IAAI;IAC/BwB,MAAM,CAAC,KAAKM,IAAI,aAAa,CAAC,GAAGM,IAAI,CAACnC,UAAU;IAChDuB,MAAM,CAAC,KAAKM,IAAI,OAAO,CAAC,GAAGlF,GAAG,CAC5BV,YAAY,CAACgD,gBAAgB,CAACuD,MAAM,CAACzD,GAAG,EAAEf,WAAW,CAAC,CAACoB,IAAI,CACzD4B,MAAM,GAAGnD,SAAS,CAACE,IAAI,GAAGF,SAAS,CAACC,KACtC,CACF,CAAC;IACD;IACA;IACA;IACA;IACAyD,MAAM,CAAC,KAAKM,IAAI,SAAS,CAAC,GAAGhF,IAAI,CAC/BmC,OAAO,CAACI,IAAI,CAACoD,MAAM,CAACpD,IAAI,CAAC,EACzB4B,MAAM,GAAG9C,YAAY,CAACH,IAAI,GAAGG,YAAY,CAACJ,KAC5C,CAAC;EACH;EAEA,OAAOyD,MAAM;AACf","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-policy.d.ts","sourceRoot":"","sources":["../../../../src/theme/color-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"color-policy.d.ts","sourceRoot":"","sources":["../../../../src/theme/color-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAK9D,sFAAsF;AACtF,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,wFAAwF;AACxF,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,kFAAkF;AAClF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AA8LlD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,UAAU,EACjB,MAAM,GAAE,aAAkB,GACzB,YAAY,CAgHd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-policy.d.ts","sourceRoot":"","sources":["../../../../src/theme/color-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"color-policy.d.ts","sourceRoot":"","sources":["../../../../src/theme/color-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAK9D,sFAAsF;AACtF,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,wFAAwF;AACxF,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,kFAAkF;AAClF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AA8LlD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,UAAU,EACjB,MAAM,GAAE,aAAkB,GACzB,YAAY,CAgHd"}
|
package/package.json
CHANGED
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"--popover-foreground": "rgb(215 229 232)",
|
|
69
69
|
"--primary": "rgb(80 150 161)",
|
|
70
70
|
"--primary-foreground": "rgb(0 0 0)",
|
|
71
|
-
"--secondary": "rgb(
|
|
72
|
-
"--secondary-foreground": "rgb(
|
|
73
|
-
"--tertiary": "rgb(
|
|
74
|
-
"--tertiary-foreground": "rgb(
|
|
71
|
+
"--secondary": "rgb(213 49 120)",
|
|
72
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
73
|
+
"--tertiary": "rgb(174 97 0)",
|
|
74
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
75
75
|
"--muted": "rgb(32 44 46)",
|
|
76
76
|
"--muted-foreground": "rgb(184 202 205)",
|
|
77
77
|
"--accent": "rgb(32 44 46)",
|
|
@@ -188,10 +188,10 @@
|
|
|
188
188
|
"--popover-foreground": "rgb(220 227 238)",
|
|
189
189
|
"--primary": "rgb(29 155 240)",
|
|
190
190
|
"--primary-foreground": "rgb(0 0 0)",
|
|
191
|
-
"--secondary": "rgb(
|
|
192
|
-
"--secondary-foreground": "rgb(
|
|
193
|
-
"--tertiary": "rgb(
|
|
194
|
-
"--tertiary-foreground": "rgb(
|
|
191
|
+
"--secondary": "rgb(214 58 43)",
|
|
192
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
193
|
+
"--tertiary": "rgb(134 116 0)",
|
|
194
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
195
195
|
"--muted": "rgb(36 43 51)",
|
|
196
196
|
"--muted-foreground": "rgb(190 199 212)",
|
|
197
197
|
"--accent": "rgb(36 43 51)",
|
|
@@ -308,10 +308,10 @@
|
|
|
308
308
|
"--popover-foreground": "rgb(217 230 220)",
|
|
309
309
|
"--primary": "rgb(16 185 129)",
|
|
310
310
|
"--primary-foreground": "rgb(0 0 0)",
|
|
311
|
-
"--secondary": "rgb(
|
|
312
|
-
"--secondary-foreground": "rgb(
|
|
313
|
-
"--tertiary": "rgb(
|
|
314
|
-
"--tertiary-foreground": "rgb(
|
|
311
|
+
"--secondary": "rgb(216 52 80)",
|
|
312
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
313
|
+
"--tertiary": "rgb(165 64 234)",
|
|
314
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
315
315
|
"--muted": "rgb(33 44 38)",
|
|
316
316
|
"--muted-foreground": "rgb(186 203 191)",
|
|
317
317
|
"--accent": "rgb(33 44 38)",
|
|
@@ -428,10 +428,10 @@
|
|
|
428
428
|
"--popover-foreground": "rgb(244 223 203)",
|
|
429
429
|
"--primary": "rgb(245 158 11)",
|
|
430
430
|
"--primary-foreground": "rgb(0 0 0)",
|
|
431
|
-
"--secondary": "rgb(0
|
|
432
|
-
"--secondary-foreground": "rgb(
|
|
433
|
-
"--tertiary": "rgb(
|
|
434
|
-
"--tertiary-foreground": "rgb(
|
|
431
|
+
"--secondary": "rgb(0 127 153)",
|
|
432
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
433
|
+
"--tertiary": "rgb(78 98 255)",
|
|
434
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
435
435
|
"--muted": "rgb(51 40 27)",
|
|
436
436
|
"--muted-foreground": "rgb(217 195 171)",
|
|
437
437
|
"--accent": "rgb(51 40 27)",
|
|
@@ -548,10 +548,10 @@
|
|
|
548
548
|
"--popover-foreground": "rgb(238 225 202)",
|
|
549
549
|
"--primary": "rgb(255 195 0)",
|
|
550
550
|
"--primary-foreground": "rgb(0 0 0)",
|
|
551
|
-
"--secondary": "rgb(0
|
|
552
|
-
"--secondary-foreground": "rgb(
|
|
553
|
-
"--tertiary": "rgb(
|
|
554
|
-
"--tertiary-foreground": "rgb(
|
|
551
|
+
"--secondary": "rgb(0 125 173)",
|
|
552
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
553
|
+
"--tertiary": "rgb(127 81 255)",
|
|
554
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
555
555
|
"--muted": "rgb(48 41 26)",
|
|
556
556
|
"--muted-foreground": "rgb(211 197 170)",
|
|
557
557
|
"--accent": "rgb(48 41 26)",
|
|
@@ -668,10 +668,10 @@
|
|
|
668
668
|
"--popover-foreground": "rgb(249 220 217)",
|
|
669
669
|
"--primary": "rgb(250 76 75)",
|
|
670
670
|
"--primary-foreground": "rgb(0 0 0)",
|
|
671
|
-
"--secondary": "rgb(0
|
|
672
|
-
"--secondary-foreground": "rgb(
|
|
673
|
-
"--tertiary": "rgb(
|
|
674
|
-
"--tertiary-foreground": "rgb(
|
|
671
|
+
"--secondary": "rgb(0 126 166)",
|
|
672
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
673
|
+
"--tertiary": "rgb(0 135 45)",
|
|
674
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
675
675
|
"--muted": "rgb(54 38 37)",
|
|
676
676
|
"--muted-foreground": "rgb(223 191 188)",
|
|
677
677
|
"--accent": "rgb(54 38 37)",
|
|
@@ -788,10 +788,10 @@
|
|
|
788
788
|
"--popover-foreground": "rgb(231 224 238)",
|
|
789
789
|
"--primary": "rgb(155 113 255)",
|
|
790
790
|
"--primary-foreground": "rgb(0 0 0)",
|
|
791
|
-
"--secondary": "rgb(
|
|
792
|
-
"--secondary-foreground": "rgb(
|
|
793
|
-
"--tertiary": "rgb(
|
|
794
|
-
"--tertiary-foreground": "rgb(
|
|
791
|
+
"--secondary": "rgb(144 112 0)",
|
|
792
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
793
|
+
"--tertiary": "rgb(10 136 0)",
|
|
794
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
795
795
|
"--muted": "rgb(44 40 51)",
|
|
796
796
|
"--muted-foreground": "rgb(203 195 213)",
|
|
797
797
|
"--accent": "rgb(44 40 51)",
|
|
@@ -908,10 +908,10 @@
|
|
|
908
908
|
"--popover-foreground": "rgb(245 220 227)",
|
|
909
909
|
"--primary": "rgb(240 75 156)",
|
|
910
910
|
"--primary-foreground": "rgb(0 0 0)",
|
|
911
|
-
"--secondary": "rgb(0
|
|
912
|
-
"--secondary-foreground": "rgb(
|
|
913
|
-
"--tertiary": "rgb(
|
|
914
|
-
"--tertiary-foreground": "rgb(
|
|
911
|
+
"--secondary": "rgb(0 129 139)",
|
|
912
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
913
|
+
"--tertiary": "rgb(0 135 37)",
|
|
914
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
915
915
|
"--muted": "rgb(53 38 43)",
|
|
916
916
|
"--muted-foreground": "rgb(219 191 200)",
|
|
917
917
|
"--accent": "rgb(53 38 43)",
|
|
@@ -1028,10 +1028,10 @@
|
|
|
1028
1028
|
"--popover-foreground": "rgb(219 227 237)",
|
|
1029
1029
|
"--primary": "rgb(14 165 233)",
|
|
1030
1030
|
"--primary-foreground": "rgb(0 0 0)",
|
|
1031
|
-
"--secondary": "rgb(
|
|
1032
|
-
"--secondary-foreground": "rgb(
|
|
1033
|
-
"--tertiary": "rgb(
|
|
1034
|
-
"--tertiary-foreground": "rgb(
|
|
1031
|
+
"--secondary": "rgb(213 61 30)",
|
|
1032
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
1033
|
+
"--tertiary": "rgb(144 112 0)",
|
|
1034
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
1035
1035
|
"--muted": "rgb(34 43 50)",
|
|
1036
1036
|
"--muted-foreground": "rgb(188 200 211)",
|
|
1037
1037
|
"--accent": "rgb(34 43 50)",
|
|
@@ -1148,10 +1148,10 @@
|
|
|
1148
1148
|
"--popover-foreground": "rgb(248 221 209)",
|
|
1149
1149
|
"--primary": "rgb(249 115 22)",
|
|
1150
1150
|
"--primary-foreground": "rgb(0 0 0)",
|
|
1151
|
-
"--secondary": "rgb(0
|
|
1152
|
-
"--secondary-foreground": "rgb(
|
|
1153
|
-
"--tertiary": "rgb(
|
|
1154
|
-
"--tertiary-foreground": "rgb(
|
|
1151
|
+
"--secondary": "rgb(0 130 130)",
|
|
1152
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
1153
|
+
"--tertiary": "rgb(81 97 255)",
|
|
1154
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
1155
1155
|
"--muted": "rgb(54 39 31)",
|
|
1156
1156
|
"--muted-foreground": "rgb(223 192 178)",
|
|
1157
1157
|
"--accent": "rgb(54 39 31)",
|
|
@@ -1268,10 +1268,10 @@
|
|
|
1268
1268
|
"--popover-foreground": "rgb(215 230 225)",
|
|
1269
1269
|
"--primary": "rgb(20 184 166)",
|
|
1270
1270
|
"--primary-foreground": "rgb(0 0 0)",
|
|
1271
|
-
"--secondary": "rgb(
|
|
1272
|
-
"--secondary-foreground": "rgb(
|
|
1273
|
-
"--tertiary": "rgb(
|
|
1274
|
-
"--tertiary-foreground": "rgb(
|
|
1271
|
+
"--secondary": "rgb(212 63 10)",
|
|
1272
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
1273
|
+
"--tertiary": "rgb(193 53 190)",
|
|
1274
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
1275
1275
|
"--muted": "rgb(32 44 42)",
|
|
1276
1276
|
"--muted-foreground": "rgb(184 202 198)",
|
|
1277
1277
|
"--accent": "rgb(32 44 42)",
|
|
@@ -1388,10 +1388,10 @@
|
|
|
1388
1388
|
"--popover-foreground": "rgb(237 222 235)",
|
|
1389
1389
|
"--primary": "rgb(196 110 222)",
|
|
1390
1390
|
"--primary-foreground": "rgb(0 0 0)",
|
|
1391
|
-
"--secondary": "rgb(0
|
|
1392
|
-
"--secondary-foreground": "rgb(
|
|
1393
|
-
"--tertiary": "rgb(
|
|
1394
|
-
"--tertiary-foreground": "rgb(
|
|
1391
|
+
"--secondary": "rgb(0 132 104)",
|
|
1392
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
1393
|
+
"--tertiary": "rgb(53 133 0)",
|
|
1394
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
1395
1395
|
"--muted": "rgb(48 39 49)",
|
|
1396
1396
|
"--muted-foreground": "rgb(210 193 210)",
|
|
1397
1397
|
"--accent": "rgb(48 39 49)",
|
|
@@ -1508,10 +1508,10 @@
|
|
|
1508
1508
|
"--popover-foreground": "rgb(223 229 211)",
|
|
1509
1509
|
"--primary": "rgb(159 251 80)",
|
|
1510
1510
|
"--primary-foreground": "rgb(0 0 0)",
|
|
1511
|
-
"--secondary": "rgb(
|
|
1512
|
-
"--secondary-foreground": "rgb(
|
|
1513
|
-
"--tertiary": "rgb(
|
|
1514
|
-
"--tertiary-foreground": "rgb(
|
|
1511
|
+
"--secondary": "rgb(92 94 255)",
|
|
1512
|
+
"--secondary-foreground": "rgb(255 255 255)",
|
|
1513
|
+
"--tertiary": "rgb(203 50 163)",
|
|
1514
|
+
"--tertiary-foreground": "rgb(255 255 255)",
|
|
1515
1515
|
"--muted": "rgb(38 44 32)",
|
|
1516
1516
|
"--muted-foreground": "rgb(193 202 180)",
|
|
1517
1517
|
"--accent": "rgb(38 44 32)",
|
|
@@ -25,12 +25,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
25
25
|
"primaryLight": "rgb(36 26 14)",
|
|
26
26
|
"primarySubtle": "rgba(202, 129, 0, 0.24)",
|
|
27
27
|
"primarySubtleForeground": "rgb(255 221 184)",
|
|
28
|
-
"secondary": "rgb(0
|
|
29
|
-
"secondaryForeground": "rgb(
|
|
28
|
+
"secondary": "rgb(0 127 153)",
|
|
29
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
30
30
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
31
31
|
"success": "rgb(16 185 129)",
|
|
32
|
-
"tertiary": "rgb(
|
|
33
|
-
"tertiaryForeground": "rgb(
|
|
32
|
+
"tertiary": "rgb(78 98 255)",
|
|
33
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
34
34
|
"text": "rgb(244 223 203)",
|
|
35
35
|
"textSecondary": "rgb(217 195 171)",
|
|
36
36
|
"textTertiary": "rgb(161 141 120)",
|
|
@@ -95,12 +95,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
95
95
|
"primaryLight": "rgb(21 28 36)",
|
|
96
96
|
"primarySubtle": "rgba(0, 151, 237, 0.24)",
|
|
97
97
|
"primarySubtleForeground": "rgb(207 229 255)",
|
|
98
|
-
"secondary": "rgb(
|
|
99
|
-
"secondaryForeground": "rgb(
|
|
98
|
+
"secondary": "rgb(214 58 43)",
|
|
99
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
100
100
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
101
101
|
"success": "rgb(16 185 129)",
|
|
102
|
-
"tertiary": "rgb(
|
|
103
|
-
"tertiaryForeground": "rgb(
|
|
102
|
+
"tertiary": "rgb(134 116 0)",
|
|
103
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
104
104
|
"text": "rgb(220 227 238)",
|
|
105
105
|
"textSecondary": "rgb(190 199 212)",
|
|
106
106
|
"textTertiary": "rgb(136 146 158)",
|
|
@@ -165,12 +165,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
165
165
|
"primaryLight": "rgb(24 29 18)",
|
|
166
166
|
"primarySubtle": "rgba(87, 163, 0, 0.24)",
|
|
167
167
|
"primarySubtleForeground": "rgb(138 254 0)",
|
|
168
|
-
"secondary": "rgb(
|
|
169
|
-
"secondaryForeground": "rgb(
|
|
168
|
+
"secondary": "rgb(92 94 255)",
|
|
169
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
170
170
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
171
171
|
"success": "rgb(16 185 129)",
|
|
172
|
-
"tertiary": "rgb(
|
|
173
|
-
"tertiaryForeground": "rgb(
|
|
172
|
+
"tertiary": "rgb(203 50 163)",
|
|
173
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
174
174
|
"text": "rgb(223 229 211)",
|
|
175
175
|
"textSecondary": "rgb(193 202 180)",
|
|
176
176
|
"textTertiary": "rgb(139 148 128)",
|
|
@@ -235,12 +235,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
235
235
|
"primaryLight": "rgb(19 30 24)",
|
|
236
236
|
"primarySubtle": "rgba(0, 165, 114, 0.24)",
|
|
237
237
|
"primarySubtleForeground": "rgb(71 255 184)",
|
|
238
|
-
"secondary": "rgb(
|
|
239
|
-
"secondaryForeground": "rgb(
|
|
238
|
+
"secondary": "rgb(216 52 80)",
|
|
239
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
240
240
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
241
241
|
"success": "rgb(16 185 129)",
|
|
242
|
-
"tertiary": "rgb(
|
|
243
|
-
"tertiaryForeground": "rgb(
|
|
242
|
+
"tertiary": "rgb(165 64 234)",
|
|
243
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
244
244
|
"text": "rgb(217 230 220)",
|
|
245
245
|
"textSecondary": "rgb(186 203 191)",
|
|
246
246
|
"textTertiary": "rgb(132 149 138)",
|
|
@@ -305,12 +305,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
305
305
|
"primaryLight": "rgb(17 30 28)",
|
|
306
306
|
"primarySubtle": "rgba(0, 163, 146, 0.24)",
|
|
307
307
|
"primarySubtleForeground": "rgb(0 254 229)",
|
|
308
|
-
"secondary": "rgb(
|
|
309
|
-
"secondaryForeground": "rgb(
|
|
308
|
+
"secondary": "rgb(212 63 10)",
|
|
309
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
310
310
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
311
311
|
"success": "rgb(16 185 129)",
|
|
312
|
-
"tertiary": "rgb(
|
|
313
|
-
"tertiaryForeground": "rgb(
|
|
312
|
+
"tertiary": "rgb(193 53 190)",
|
|
313
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
314
314
|
"text": "rgb(215 230 225)",
|
|
315
315
|
"textSecondary": "rgb(184 202 198)",
|
|
316
316
|
"textTertiary": "rgb(130 148 144)",
|
|
@@ -375,12 +375,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
375
375
|
"primaryLight": "rgb(38 24 17)",
|
|
376
376
|
"primarySubtle": "rgba(237, 105, 0, 0.24)",
|
|
377
377
|
"primarySubtleForeground": "rgb(255 219 202)",
|
|
378
|
-
"secondary": "rgb(0
|
|
379
|
-
"secondaryForeground": "rgb(
|
|
378
|
+
"secondary": "rgb(0 130 130)",
|
|
379
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
380
380
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
381
381
|
"success": "rgb(16 185 129)",
|
|
382
|
-
"tertiary": "rgb(
|
|
383
|
-
"tertiaryForeground": "rgb(
|
|
382
|
+
"tertiary": "rgb(81 97 255)",
|
|
383
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
384
384
|
"text": "rgb(248 221 209)",
|
|
385
385
|
"textSecondary": "rgb(223 192 178)",
|
|
386
386
|
"textTertiary": "rgb(166 139 126)",
|
|
@@ -445,12 +445,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
445
445
|
"primaryLight": "rgb(33 25 34)",
|
|
446
446
|
"primarySubtle": "rgba(213, 86, 255, 0.24)",
|
|
447
447
|
"primarySubtleForeground": "rgb(251 215 255)",
|
|
448
|
-
"secondary": "rgb(0
|
|
449
|
-
"secondaryForeground": "rgb(
|
|
448
|
+
"secondary": "rgb(0 132 104)",
|
|
449
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
450
450
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
451
451
|
"success": "rgb(16 185 129)",
|
|
452
|
-
"tertiary": "rgb(
|
|
453
|
-
"tertiaryForeground": "rgb(
|
|
452
|
+
"tertiary": "rgb(53 133 0)",
|
|
453
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
454
454
|
"text": "rgb(237 222 235)",
|
|
455
455
|
"textSecondary": "rgb(210 193 210)",
|
|
456
456
|
"textTertiary": "rgb(155 140 155)",
|
|
@@ -515,12 +515,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
515
515
|
"primaryLight": "rgb(37 24 29)",
|
|
516
516
|
"primarySubtle": "rgba(255, 69, 163, 0.24)",
|
|
517
517
|
"primarySubtleForeground": "rgb(255 217 228)",
|
|
518
|
-
"secondary": "rgb(0
|
|
519
|
-
"secondaryForeground": "rgb(
|
|
518
|
+
"secondary": "rgb(0 129 139)",
|
|
519
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
520
520
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
521
521
|
"success": "rgb(16 185 129)",
|
|
522
|
-
"tertiary": "rgb(
|
|
523
|
-
"tertiaryForeground": "rgb(
|
|
522
|
+
"tertiary": "rgb(0 135 37)",
|
|
523
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
524
524
|
"text": "rgb(245 220 227)",
|
|
525
525
|
"textSecondary": "rgb(219 191 200)",
|
|
526
526
|
"textTertiary": "rgb(163 138 146)",
|
|
@@ -585,12 +585,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
585
585
|
"primaryLight": "rgb(29 26 36)",
|
|
586
586
|
"primarySubtle": "rgba(160, 120, 255, 0.24)",
|
|
587
587
|
"primarySubtleForeground": "rgb(233 221 255)",
|
|
588
|
-
"secondary": "rgb(
|
|
589
|
-
"secondaryForeground": "rgb(
|
|
588
|
+
"secondary": "rgb(144 112 0)",
|
|
589
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
590
590
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
591
591
|
"success": "rgb(16 185 129)",
|
|
592
|
-
"tertiary": "rgb(
|
|
593
|
-
"tertiaryForeground": "rgb(
|
|
592
|
+
"tertiary": "rgb(10 136 0)",
|
|
593
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
594
594
|
"text": "rgb(231 224 238)",
|
|
595
595
|
"textSecondary": "rgb(203 195 213)",
|
|
596
596
|
"textTertiary": "rgb(148 142 159)",
|
|
@@ -655,12 +655,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
655
655
|
"primaryLight": "rgb(39 24 23)",
|
|
656
656
|
"primarySubtle": "rgba(255, 84, 81, 0.24)",
|
|
657
657
|
"primarySubtleForeground": "rgb(255 218 215)",
|
|
658
|
-
"secondary": "rgb(0
|
|
659
|
-
"secondaryForeground": "rgb(
|
|
658
|
+
"secondary": "rgb(0 126 166)",
|
|
659
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
660
660
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
661
661
|
"success": "rgb(16 185 129)",
|
|
662
|
-
"tertiary": "rgb(
|
|
663
|
-
"tertiaryForeground": "rgb(
|
|
662
|
+
"tertiary": "rgb(0 135 45)",
|
|
663
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
664
664
|
"text": "rgb(249 220 217)",
|
|
665
665
|
"textSecondary": "rgb(223 191 188)",
|
|
666
666
|
"textTertiary": "rgb(167 138 136)",
|
|
@@ -725,12 +725,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
725
725
|
"primaryLight": "rgb(20 29 35)",
|
|
726
726
|
"primarySubtle": "rgba(0, 154, 218, 0.24)",
|
|
727
727
|
"primarySubtleForeground": "rgb(201 230 255)",
|
|
728
|
-
"secondary": "rgb(
|
|
729
|
-
"secondaryForeground": "rgb(
|
|
728
|
+
"secondary": "rgb(213 61 30)",
|
|
729
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
730
730
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
731
731
|
"success": "rgb(16 185 129)",
|
|
732
|
-
"tertiary": "rgb(
|
|
733
|
-
"tertiaryForeground": "rgb(
|
|
732
|
+
"tertiary": "rgb(144 112 0)",
|
|
733
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
734
734
|
"text": "rgb(219 227 237)",
|
|
735
735
|
"textSecondary": "rgb(188 200 211)",
|
|
736
736
|
"textTertiary": "rgb(134 146 157)",
|
|
@@ -795,12 +795,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
795
795
|
"primaryLight": "rgb(17 29 32)",
|
|
796
796
|
"primarySubtle": "rgba(0, 159, 177, 0.24)",
|
|
797
797
|
"primarySubtleForeground": "rgb(154 240 255)",
|
|
798
|
-
"secondary": "rgb(
|
|
799
|
-
"secondaryForeground": "rgb(
|
|
798
|
+
"secondary": "rgb(213 49 120)",
|
|
799
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
800
800
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
801
801
|
"success": "rgb(16 185 129)",
|
|
802
|
-
"tertiary": "rgb(
|
|
803
|
-
"tertiaryForeground": "rgb(
|
|
802
|
+
"tertiary": "rgb(174 97 0)",
|
|
803
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
804
804
|
"text": "rgb(215 229 232)",
|
|
805
805
|
"textSecondary": "rgb(184 202 205)",
|
|
806
806
|
"textTertiary": "rgb(131 148 151)",
|
|
@@ -865,12 +865,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
|
|
|
865
865
|
"primaryLight": "rgb(33 27 13)",
|
|
866
866
|
"primarySubtle": "rgba(182, 138, 0, 0.24)",
|
|
867
867
|
"primarySubtleForeground": "rgb(255 223 154)",
|
|
868
|
-
"secondary": "rgb(0
|
|
869
|
-
"secondaryForeground": "rgb(
|
|
868
|
+
"secondary": "rgb(0 125 173)",
|
|
869
|
+
"secondaryForeground": "rgb(255 255 255)",
|
|
870
870
|
"shadow": "rgba(0, 0, 0, 0.3)",
|
|
871
871
|
"success": "rgb(16 185 129)",
|
|
872
|
-
"tertiary": "rgb(
|
|
873
|
-
"tertiaryForeground": "rgb(
|
|
872
|
+
"tertiary": "rgb(127 81 255)",
|
|
873
|
+
"tertiaryForeground": "rgb(255 255 255)",
|
|
874
874
|
"text": "rgb(238 225 202)",
|
|
875
875
|
"textSecondary": "rgb(211 197 170)",
|
|
876
876
|
"textTertiary": "rgb(156 143 119)",
|
|
@@ -115,4 +115,24 @@ describe('colour policy legibility', () => {
|
|
|
115
115
|
it('never picks black where white is legible', () => {
|
|
116
116
|
expect(avoidableBlack).toEqual([]);
|
|
117
117
|
});
|
|
118
|
+
|
|
119
|
+
// A PRODUCT decision, not a property of the colour maths, which is exactly why
|
|
120
|
+
// it needs an assertion: the accent fill is what a FAB and a compose button
|
|
121
|
+
// paint with, and those carry a white label. It has silently flipped to black
|
|
122
|
+
// twice — both times as a side effect of tuning the accent's TONE for hue
|
|
123
|
+
// fidelity, with nothing in the suite watching the label.
|
|
124
|
+
it('accent fills carry a WHITE label in both modes', () => {
|
|
125
|
+
const black: string[] = [];
|
|
126
|
+
for (const preset of APP_COLOR_NAMES) {
|
|
127
|
+
for (const mode of ['light', 'dark'] as const) {
|
|
128
|
+
const tokens = getResolvedTokens(preset, mode);
|
|
129
|
+
for (const family of ['secondary', 'tertiary'] as const) {
|
|
130
|
+
if (tokens[`--${family}-foreground`] !== 'rgb(255 255 255)') {
|
|
131
|
+
black.push(`${preset}/${mode} --${family}`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
expect(black).toEqual([]);
|
|
137
|
+
});
|
|
118
138
|
});
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
import { argbFromHex, type RoleColors } from './color-engine';
|
|
26
26
|
import { Hct } from './color-engine/hct';
|
|
27
27
|
import { TonalPalette } from './color-engine/tonal-palette';
|
|
28
|
-
import { fixIfDisliked } from './color-engine/dislike-analyzer';
|
|
29
28
|
import { blueFromArgb, greenFromArgb, redFromArgb } from './color-engine/color-utils';
|
|
30
29
|
|
|
31
30
|
/** Semantic status seeds. Only hue and chroma survive; tones come from the policy. */
|
|
@@ -95,9 +94,21 @@ const noLegibleForeground = (argb: number): boolean =>
|
|
|
95
94
|
/** The tone a white-label fill sits at in LIGHT mode. */
|
|
96
95
|
const LIGHT_FILL_TONE = 45;
|
|
97
96
|
|
|
98
|
-
/** No dark-mode fill sits below this: under it a colour goes heavy on black. */
|
|
97
|
+
/** No dark-mode BRAND fill sits below this: under it a colour goes heavy on black. */
|
|
99
98
|
const DARK_FLOOR = 58;
|
|
100
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Accent fills stop here in dark, and the ceiling is not aesthetic.
|
|
102
|
+
*
|
|
103
|
+
* White text needs a fill at or below tone 49, and an accent is a BUTTON — the
|
|
104
|
+
* FAB, the compose action — where white on colour is the convention. Sitting the
|
|
105
|
+
* accent at its hue's peak tone makes a lime look like lime, but peaks live at
|
|
106
|
+
* tone 88 for that family, and no label survives up there except black. The hue
|
|
107
|
+
* work still stands (a magenta seed's accent is the lime family, not the emerald
|
|
108
|
+
* one it used to be); only its brightness is capped so the label can be white.
|
|
109
|
+
*/
|
|
110
|
+
const DARK_ACCENT_TONE = 49;
|
|
111
|
+
|
|
101
112
|
/** Chroma ceiling for an accent FILL — the brand palette's own maximum, not the gamut's. */
|
|
102
113
|
const ACCENT_CHROMA = 80;
|
|
103
114
|
|
|
@@ -291,13 +302,15 @@ export function buildPolicyTokens(
|
|
|
291
302
|
// analyzer runs there — Bloom ships it yet only reaches it on the fidelity
|
|
292
303
|
// path, which no Bloom variant uses, so a rotated accent could land in the
|
|
293
304
|
// band with nothing to lift it out.
|
|
294
|
-
//
|
|
295
|
-
//
|
|
296
|
-
//
|
|
297
|
-
//
|
|
298
|
-
//
|
|
299
|
-
//
|
|
300
|
-
|
|
305
|
+
// Bloom's own tone policy governs this, and M3's `fixIfDisliked` deliberately
|
|
306
|
+
// does not get a say. That heuristic flags dark yellow-greens and lifts them
|
|
307
|
+
// to tone 70 — a remedy calibrated for M3's tone assignments, where nothing
|
|
308
|
+
// depends on staying under the ceiling white text needs. Here everything does:
|
|
309
|
+
// a 25-tone lift puts the fill above it and flips a compose button's label to
|
|
310
|
+
// black. The accent chroma cap already keeps these hues out of neon territory,
|
|
311
|
+
// and the hue itself is the caller's brand rather than ours to move. The
|
|
312
|
+
// analyzer still runs where it was designed to, inside `color-roles`.
|
|
313
|
+
const tone = isDark ? DARK_ACCENT_TONE : LIGHT_FILL_TONE;
|
|
301
314
|
const pair = fillPair(fillPalette, tone);
|
|
302
315
|
tokens[`--${role}`] = pair.fill;
|
|
303
316
|
tokens[`--${role}-foreground`] = pair.foreground;
|