@oxyhq/bloom 0.74.2 → 0.74.3
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 +8 -9
- package/lib/commonjs/theme/color-policy.js.map +1 -1
- package/lib/module/theme/color-policy.js +8 -9
- 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 +1 -20
- package/src/theme/color-policy.ts +8 -9
|
@@ -91,16 +91,15 @@ const LIGHT_FILL_TONE = 45;
|
|
|
91
91
|
const DARK_FLOOR = 58;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* Accent fills
|
|
94
|
+
* Accent fills sit at their hue's PEAK tone in dark — where the hue is most
|
|
95
|
+
* itself, so a lime reads as lime rather than olive.
|
|
95
96
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* one it used to be); only its brightness is capped so the label can be white.
|
|
97
|
+
* The cost is fixed and cannot be engineered away: peaks for that family live
|
|
98
|
+
* around tone 88, and white text needs a fill at or below 49, so these buttons
|
|
99
|
+
* carry a BLACK label. Capping the tone to win the white label back turns the
|
|
100
|
+
* same accents dull — measured on blue, rgb(252 220 0) becomes rgb(134 116 0).
|
|
101
|
+
* The bright colour is the deliberate choice.
|
|
102
102
|
*/
|
|
103
|
-
const DARK_ACCENT_TONE = 49;
|
|
104
103
|
|
|
105
104
|
/** Chroma ceiling for an accent FILL — the brand palette's own maximum, not the gamut's. */
|
|
106
105
|
const ACCENT_CHROMA = 80;
|
|
@@ -297,7 +296,7 @@ function buildPolicyTokens(seedHex, isDark, roles, pinned = {}) {
|
|
|
297
296
|
// black. The accent chroma cap already keeps these hues out of neon territory,
|
|
298
297
|
// and the hue itself is the caller's brand rather than ours to move. The
|
|
299
298
|
// analyzer still runs where it was designed to, inside `color-roles`.
|
|
300
|
-
const tone = isDark ?
|
|
299
|
+
const tone = isDark ? Math.max(peakTone(hue), DARK_FLOOR) : LIGHT_FILL_TONE;
|
|
301
300
|
const pair = fillPair(fillPalette, tone);
|
|
302
301
|
tokens[`--${role}`] = pair.fill;
|
|
303
302
|
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","
|
|
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;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,OAAOC,CAAC,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,CAAC,EACzB8B,MAAM,GAAGjD,YAAY,CAACH,IAAI,GAAGG,YAAY,CAACJ,KAC5C,CAAC;EACH;EAEA,OAAO4D,MAAM;AACf","ignoreList":[]}
|
|
@@ -86,16 +86,15 @@ const LIGHT_FILL_TONE = 45;
|
|
|
86
86
|
const DARK_FLOOR = 58;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* Accent fills
|
|
89
|
+
* Accent fills sit at their hue's PEAK tone in dark — where the hue is most
|
|
90
|
+
* itself, so a lime reads as lime rather than olive.
|
|
90
91
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* one it used to be); only its brightness is capped so the label can be white.
|
|
92
|
+
* The cost is fixed and cannot be engineered away: peaks for that family live
|
|
93
|
+
* around tone 88, and white text needs a fill at or below 49, so these buttons
|
|
94
|
+
* carry a BLACK label. Capping the tone to win the white label back turns the
|
|
95
|
+
* same accents dull — measured on blue, rgb(252 220 0) becomes rgb(134 116 0).
|
|
96
|
+
* The bright colour is the deliberate choice.
|
|
97
97
|
*/
|
|
98
|
-
const DARK_ACCENT_TONE = 49;
|
|
99
98
|
|
|
100
99
|
/** Chroma ceiling for an accent FILL — the brand palette's own maximum, not the gamut's. */
|
|
101
100
|
const ACCENT_CHROMA = 80;
|
|
@@ -292,7 +291,7 @@ export function buildPolicyTokens(seedHex, isDark, roles, pinned = {}) {
|
|
|
292
291
|
// black. The accent chroma cap already keeps these hues out of neon territory,
|
|
293
292
|
// and the hue itself is the caller's brand rather than ours to move. The
|
|
294
293
|
// analyzer still runs where it was designed to, inside `color-roles`.
|
|
295
|
-
const tone = isDark ?
|
|
294
|
+
const tone = isDark ? Math.max(peakTone(hue), DARK_FLOOR) : LIGHT_FILL_TONE;
|
|
296
295
|
const pair = fillPair(fillPalette, tone);
|
|
297
296
|
tokens[`--${role}`] = pair.fill;
|
|
298
297
|
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","
|
|
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;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9C,YAAY,CAAC+C,gBAAgB,CAACuD,MAAM,CAACzD,GAAG,EAAEyD,MAAM,CAACnD,MAAM,CAAC;IACxE,MAAM8C,IAAI,GAAGtC,QAAQ,CAACb,OAAO,EAAEgC,MAAM,GAAG3D,IAAI,CAACiE,GAAG,CAACkB,MAAM,CAACpD,IAAI,EAAEzB,UAAU,CAAC,GAAGD,eAAe,CAAC;IAC5F6D,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,GAAGjF,GAAG,CAC5BV,YAAY,CAAC+C,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,GAAG/E,IAAI,CAC/BkC,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;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;
|
|
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;AA6LlD;;;;;;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;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;
|
|
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;AA6LlD;;;;;;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(243 74 143)",
|
|
72
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
73
|
+
"--tertiary": "rgb(253 144 0)",
|
|
74
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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(247 81 63)",
|
|
192
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
193
|
+
"--tertiary": "rgb(252 220 0)",
|
|
194
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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(247 76 101)",
|
|
312
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
313
|
+
"--tertiary": "rgb(189 94 255)",
|
|
314
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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 213 255)",
|
|
432
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
433
|
+
"--tertiary": "rgb(111 128 255)",
|
|
434
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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 186 255)",
|
|
552
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
553
|
+
"--tertiary": "rgb(149 115 255)",
|
|
554
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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 193 253)",
|
|
672
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
673
|
+
"--tertiary": "rgb(90 250 115)",
|
|
674
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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(254 199 0)",
|
|
792
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
793
|
+
"--tertiary": "rgb(118 245 94)",
|
|
794
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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 237 255)",
|
|
912
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
913
|
+
"--tertiary": "rgb(100 250 110)",
|
|
914
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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(246 83 51)",
|
|
1032
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
1033
|
+
"--tertiary": "rgb(253 200 0)",
|
|
1034
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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 255 254)",
|
|
1152
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
1153
|
+
"--tertiary": "rgb(114 127 255)",
|
|
1154
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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(244 86 35)",
|
|
1272
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
1273
|
+
"--tertiary": "rgb(227 85 221)",
|
|
1274
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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 253 200)",
|
|
1392
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
1393
|
+
"--tertiary": "rgb(142 249 86)",
|
|
1394
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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(122 125 255)",
|
|
1512
|
+
"--secondary-foreground": "rgb(0 0 0)",
|
|
1513
|
+
"--tertiary": "rgb(232 76 188)",
|
|
1514
|
+
"--tertiary-foreground": "rgb(0 0 0)",
|
|
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 213 255)",
|
|
29
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(111 128 255)",
|
|
33
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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(247 81 63)",
|
|
99
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(252 220 0)",
|
|
103
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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(122 125 255)",
|
|
169
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(232 76 188)",
|
|
173
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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(247 76 101)",
|
|
239
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(189 94 255)",
|
|
243
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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(244 86 35)",
|
|
309
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(227 85 221)",
|
|
313
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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 255 254)",
|
|
379
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(114 127 255)",
|
|
383
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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 253 200)",
|
|
449
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(142 249 86)",
|
|
453
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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 237 255)",
|
|
519
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(100 250 110)",
|
|
523
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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(254 199 0)",
|
|
589
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(118 245 94)",
|
|
593
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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 193 253)",
|
|
659
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(90 250 115)",
|
|
663
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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(246 83 51)",
|
|
729
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(253 200 0)",
|
|
733
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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(243 74 143)",
|
|
799
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(253 144 0)",
|
|
803
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
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 186 255)",
|
|
869
|
+
"secondaryForeground": "rgb(0 0 0)",
|
|
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(149 115 255)",
|
|
873
|
+
"tertiaryForeground": "rgb(0 0 0)",
|
|
874
874
|
"text": "rgb(238 225 202)",
|
|
875
875
|
"textSecondary": "rgb(211 197 170)",
|
|
876
876
|
"textTertiary": "rgb(156 143 119)",
|
|
@@ -116,23 +116,4 @@ describe('colour policy legibility', () => {
|
|
|
116
116
|
expect(avoidableBlack).toEqual([]);
|
|
117
117
|
});
|
|
118
118
|
|
|
119
|
-
|
|
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
|
-
});
|
|
138
|
-
});
|
|
119
|
+
});
|
|
@@ -98,16 +98,15 @@ const LIGHT_FILL_TONE = 45;
|
|
|
98
98
|
const DARK_FLOOR = 58;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Accent fills
|
|
101
|
+
* Accent fills sit at their hue's PEAK tone in dark — where the hue is most
|
|
102
|
+
* itself, so a lime reads as lime rather than olive.
|
|
102
103
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* one it used to be); only its brightness is capped so the label can be white.
|
|
104
|
+
* The cost is fixed and cannot be engineered away: peaks for that family live
|
|
105
|
+
* around tone 88, and white text needs a fill at or below 49, so these buttons
|
|
106
|
+
* carry a BLACK label. Capping the tone to win the white label back turns the
|
|
107
|
+
* same accents dull — measured on blue, rgb(252 220 0) becomes rgb(134 116 0).
|
|
108
|
+
* The bright colour is the deliberate choice.
|
|
109
109
|
*/
|
|
110
|
-
const DARK_ACCENT_TONE = 49;
|
|
111
110
|
|
|
112
111
|
/** Chroma ceiling for an accent FILL — the brand palette's own maximum, not the gamut's. */
|
|
113
112
|
const ACCENT_CHROMA = 80;
|
|
@@ -310,7 +309,7 @@ export function buildPolicyTokens(
|
|
|
310
309
|
// black. The accent chroma cap already keeps these hues out of neon territory,
|
|
311
310
|
// and the hue itself is the caller's brand rather than ours to move. The
|
|
312
311
|
// analyzer still runs where it was designed to, inside `color-roles`.
|
|
313
|
-
const tone = isDark ?
|
|
312
|
+
const tone = isDark ? Math.max(peakTone(hue), DARK_FLOOR) : LIGHT_FILL_TONE;
|
|
314
313
|
const pair = fillPair(fillPalette, tone);
|
|
315
314
|
tokens[`--${role}`] = pair.fill;
|
|
316
315
|
tokens[`--${role}-foreground`] = pair.foreground;
|