@udixio/theme 2.1.17 → 2.1.18
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/CHANGELOG.md +10 -0
- package/dist/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/browser.cjs +2 -2
- package/dist/browser.js +2 -2
- package/dist/config/config.interface.d.ts +3 -1
- package/dist/config/config.interface.d.ts.map +1 -1
- package/dist/context/context.d.ts +3 -1
- package/dist/context/context.d.ts.map +1 -1
- package/dist/{font.plugin-CE1jX3iF.js → font.plugin-CZBx3UOh.js} +1 -1
- package/dist/{font.plugin-DKvzB0yr.cjs → font.plugin-Dyfi_9m6.cjs} +1 -1
- package/dist/{load-from-path-IJo3DMek.js → load-from-path-CWtVz4o_.js} +1 -1
- package/dist/{load-from-path-CuZeSC9R.cjs → load-from-path-CqNK9dVK.cjs} +2 -2
- package/dist/{loader-COk_13QK.cjs → loader-Bwk-gC1Q.cjs} +7 -1
- package/dist/{loader-DPnknsVo.js → loader-CXjYZgR0.js} +7 -1
- package/dist/node.cjs +3 -3
- package/dist/node.js +4 -4
- package/package.json +1 -1
- package/src/config/config.interface.ts +3 -2
- package/src/context/context.ts +8 -1
- package/src/variant/variants/udixio.variant.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 2.1.18 (2026-03-22)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **theme:** enhance `sourceColor` flexibility and improve context handling ([9bb6068](https://github.com/Udixio/UI/commit/9bb6068))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Joël VIGREUX
|
|
10
|
+
|
|
1
11
|
## 2.1.17 (2026-03-20)
|
|
2
12
|
|
|
3
13
|
### 🩹 Fixes
|
package/dist/bin.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const commander = require("commander");
|
|
3
3
|
const chokidar = require("chokidar");
|
|
4
4
|
const chalk = require("chalk");
|
|
5
|
-
const loadFromPath = require("./load-from-path-
|
|
5
|
+
const loadFromPath = require("./load-from-path-CqNK9dVK.cjs");
|
|
6
6
|
const program = new commander.Command();
|
|
7
7
|
async function runOnce(configPath) {
|
|
8
8
|
try {
|
package/dist/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import chokidar from "chokidar";
|
|
3
3
|
import chalk from "chalk";
|
|
4
|
-
import { l as loadFromPath } from "./load-from-path-
|
|
4
|
+
import { l as loadFromPath } from "./load-from-path-CWtVz4o_.js";
|
|
5
5
|
const program = new Command();
|
|
6
6
|
async function runOnce(configPath) {
|
|
7
7
|
try {
|
package/dist/browser.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const loader = require("./loader-
|
|
4
|
-
const font_plugin = require("./font.plugin-
|
|
3
|
+
const loader = require("./loader-Bwk-gC1Q.cjs");
|
|
4
|
+
const font_plugin = require("./font.plugin-Dyfi_9m6.cjs");
|
|
5
5
|
exports.API = loader.API;
|
|
6
6
|
exports.AppContainer = loader.AppContainer;
|
|
7
7
|
exports.AppModule = loader.AppModule;
|
package/dist/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A, a, b, C, c, d, e, f, g, h, i, j, k, D, P, l, m, n, o, V, p, q, r, s, t, u, v, w, x, y, z, B, E, F, G } from "./loader-
|
|
2
|
-
import { F as F2, a as a2, P as P2, b as b2, d as d2 } from "./font.plugin-
|
|
1
|
+
import { A, a, b, C, c, d, e, f, g, h, i, j, k, D, P, l, m, n, o, V, p, q, r, s, t, u, v, w, x, y, z, B, E, F, G } from "./loader-CXjYZgR0.js";
|
|
2
|
+
import { F as F2, a as a2, P as P2, b as b2, d as d2 } from "./font.plugin-CZBx3UOh.js";
|
|
3
3
|
export {
|
|
4
4
|
A as API,
|
|
5
5
|
a as AppContainer,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AddColorsOptions } from '../color';
|
|
2
|
+
import { Hct } from '../material-color-utilities/htc';
|
|
2
3
|
import { PluginAbstract } from '../plugin';
|
|
3
4
|
import { Variant } from '../variant/variant';
|
|
4
5
|
import { PaletteCallback } from '../palette/palette';
|
|
6
|
+
import { Context } from '../context';
|
|
5
7
|
export interface ConfigInterface {
|
|
6
|
-
sourceColor: string;
|
|
8
|
+
sourceColor: string | Hct | ((context: Context) => string | Hct);
|
|
7
9
|
contrastLevel?: number;
|
|
8
10
|
isDark?: boolean;
|
|
9
11
|
variant?: Variant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.interface.d.ts","sourceRoot":"","sources":["../../src/config/config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"config.interface.d.ts","sourceRoot":"","sources":["../../src/config/config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAAC,CAAC;IACpD,OAAO,CAAC,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;CACtC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Hct } from '../material-color-utilities/htc';
|
|
2
2
|
import { Variant } from '../variant/variant';
|
|
3
|
+
import { ConfigInterface } from '../config';
|
|
3
4
|
export interface ContextOptions {
|
|
4
|
-
sourceColor:
|
|
5
|
+
sourceColor: ConfigInterface['sourceColor'] | Hct;
|
|
5
6
|
contrastLevel: number;
|
|
6
7
|
isDark: boolean;
|
|
7
8
|
variant: Variant;
|
|
@@ -33,6 +34,7 @@ export declare class Context {
|
|
|
33
34
|
get contrastLevel(): number;
|
|
34
35
|
set sourceColor(sourceColor: string);
|
|
35
36
|
get sourceColor(): Hct;
|
|
37
|
+
get rawSourceColor(): ContextOptions['sourceColor'];
|
|
36
38
|
set variant(variant: Variant);
|
|
37
39
|
get variant(): Variant;
|
|
38
40
|
temp<T>(args: Partial<ContextOptions>, callback: () => T): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,eAAe,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAClC,OAAO,CAAC,WAAW,CAA+B;IAClD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAEzB;;IAUP;;;;;;;;OAQG;IACH,MAAM,CAAC,iBAAiB,CAAC,CAAC,EACxB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,CAAC,GAC5B;QAAE,MAAM,EAAE,CAAC,CAAC;QAAC,YAAY,EAAE,CAAC,MAAM,OAAO,CAAC,EAAE,CAAA;KAAE;IAsBjD,GAAG,CAAC,OAAO,EAAE,cAAc;IAoBpB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC;IA4B3C,OAAO,CAAC,UAAU;IAalB,IAAI,QAAQ,CAAC,MAAM,EAAE,OAAO,EAE3B;IACD,IAAI,MAAM,YAET;IAED,IAAI,aAAa,CAAC,aAAa,EAAE,MAAM,EAEtC;IACD,IAAI,aAAa,IAHgB,MAAM,CAKtC;IAED,IAAI,WAAW,CAAC,WAAW,EAAE,MAAM,EAElC;IACD,IAAI,WAAW,IAAI,GAAG,CASrB;IACD,IAAI,cAAc,IAAI,cAAc,CAAC,aAAa,CAAC,CAElD;IAED,IAAI,OAAO,CAAC,OAAO,EAAE,OAAO,EAE3B;IACD,IAAI,OAAO,IAHU,OAAO,CAK3B;IAED,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC;IAW5D,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,OAAO,CAAC,EAAE,KAAK,IAAI,GAAG,IAAI;CAG/D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import "./loader-
|
|
4
|
+
import "./loader-CXjYZgR0.js";
|
|
5
5
|
class PluginAbstract {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
__publicField(this, "options");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
require("./loader-
|
|
5
|
+
require("./loader-Bwk-gC1Q.cjs");
|
|
6
6
|
class PluginAbstract {
|
|
7
7
|
constructor(options) {
|
|
8
8
|
__publicField(this, "options");
|
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
|
-
const loader = require("./loader-
|
|
24
|
+
const loader = require("./loader-Bwk-gC1Q.cjs");
|
|
25
25
|
const fs = require("node:fs");
|
|
26
26
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
27
27
|
function _interopNamespaceDefault(e) {
|
|
@@ -44,7 +44,7 @@ const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
|
|
|
44
44
|
async function resolveConfig(configPath = "./theme.config") {
|
|
45
45
|
const { createJiti } = await import("jiti");
|
|
46
46
|
const { resolve } = await import("pathe");
|
|
47
|
-
const jiti = createJiti(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("load-from-path-
|
|
47
|
+
const jiti = createJiti(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("load-from-path-CqNK9dVK.cjs", document.baseURI).href, {
|
|
48
48
|
debug: process.env.NODE_ENV === "development",
|
|
49
49
|
fsCache: true,
|
|
50
50
|
interopDefault: true
|
|
@@ -2591,11 +2591,17 @@ class Context {
|
|
|
2591
2591
|
}
|
|
2592
2592
|
get sourceColor() {
|
|
2593
2593
|
let sourceColor = this.getOptions().sourceColor;
|
|
2594
|
+
if (typeof sourceColor == "function") {
|
|
2595
|
+
sourceColor = sourceColor(this);
|
|
2596
|
+
}
|
|
2594
2597
|
if (typeof sourceColor === "string") {
|
|
2595
2598
|
sourceColor = Hct.fromInt(materialColorUtilities.argbFromHex(sourceColor));
|
|
2596
2599
|
}
|
|
2597
2600
|
return sourceColor;
|
|
2598
2601
|
}
|
|
2602
|
+
get rawSourceColor() {
|
|
2603
|
+
return this.getOptions().sourceColor;
|
|
2604
|
+
}
|
|
2599
2605
|
set variant(variant2) {
|
|
2600
2606
|
this.update({ variant: variant2 });
|
|
2601
2607
|
}
|
|
@@ -3101,7 +3107,7 @@ const highestSurface = (context, colorService) => {
|
|
|
3101
3107
|
};
|
|
3102
3108
|
const createMinContrastToneAdjuster = (ctx, colors, options) => {
|
|
3103
3109
|
const { selfKey, referenceKey } = options;
|
|
3104
|
-
const minContrast = ctx.contrastLevel >= 0 ? normalize(ctx.contrastLevel, [0, 1], [
|
|
3110
|
+
const minContrast = ctx.contrastLevel >= 0 ? normalize(ctx.contrastLevel, [0, 1], [3, 7]) : normalize(ctx.contrastLevel, [-1, 0], [0, 3]);
|
|
3105
3111
|
const referenceTone = referenceKey ? colors.get(referenceKey).getTone() : highestSurface(ctx, colors).getTone();
|
|
3106
3112
|
const baseTone = colors.get(selfKey).options.tone;
|
|
3107
3113
|
let selfTone = baseTone;
|
|
@@ -2590,11 +2590,17 @@ class Context {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
get sourceColor() {
|
|
2592
2592
|
let sourceColor = this.getOptions().sourceColor;
|
|
2593
|
+
if (typeof sourceColor == "function") {
|
|
2594
|
+
sourceColor = sourceColor(this);
|
|
2595
|
+
}
|
|
2593
2596
|
if (typeof sourceColor === "string") {
|
|
2594
2597
|
sourceColor = Hct.fromInt(argbFromHex(sourceColor));
|
|
2595
2598
|
}
|
|
2596
2599
|
return sourceColor;
|
|
2597
2600
|
}
|
|
2601
|
+
get rawSourceColor() {
|
|
2602
|
+
return this.getOptions().sourceColor;
|
|
2603
|
+
}
|
|
2598
2604
|
set variant(variant2) {
|
|
2599
2605
|
this.update({ variant: variant2 });
|
|
2600
2606
|
}
|
|
@@ -3100,7 +3106,7 @@ const highestSurface = (context, colorService) => {
|
|
|
3100
3106
|
};
|
|
3101
3107
|
const createMinContrastToneAdjuster = (ctx, colors, options) => {
|
|
3102
3108
|
const { selfKey, referenceKey } = options;
|
|
3103
|
-
const minContrast = ctx.contrastLevel >= 0 ? normalize(ctx.contrastLevel, [0, 1], [
|
|
3109
|
+
const minContrast = ctx.contrastLevel >= 0 ? normalize(ctx.contrastLevel, [0, 1], [3, 7]) : normalize(ctx.contrastLevel, [-1, 0], [0, 3]);
|
|
3104
3110
|
const referenceTone = referenceKey ? colors.get(referenceKey).getTone() : highestSurface(ctx, colors).getTone();
|
|
3105
3111
|
const baseTone = colors.get(selfKey).options.tone;
|
|
3106
3112
|
let selfTone = baseTone;
|
package/dist/node.cjs
CHANGED
|
@@ -22,9 +22,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
25
|
-
const loader = require("./loader-
|
|
26
|
-
const font_plugin = require("./font.plugin-
|
|
27
|
-
const loadFromPath = require("./load-from-path-
|
|
25
|
+
const loader = require("./loader-Bwk-gC1Q.cjs");
|
|
26
|
+
const font_plugin = require("./font.plugin-Dyfi_9m6.cjs");
|
|
27
|
+
const loadFromPath = require("./load-from-path-CqNK9dVK.cjs");
|
|
28
28
|
let unpluginInstance = null;
|
|
29
29
|
const createUnpluginTheme = async () => {
|
|
30
30
|
if (unpluginInstance) {
|
package/dist/node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A, a, b, C, c, d, e, f, g, h, i, j, k, D, P, l, m, n, o, V, p, q, r, s, t, u, v, w, x, y, z, B, E, F, G } from "./loader-
|
|
2
|
-
import { F as F2, a as a2, P as P2, b as b2, d as d2 } from "./font.plugin-
|
|
3
|
-
import { l as loadFromPath } from "./load-from-path-
|
|
4
|
-
import { r as r2 } from "./load-from-path-
|
|
1
|
+
import { A, a, b, C, c, d, e, f, g, h, i, j, k, D, P, l, m, n, o, V, p, q, r, s, t, u, v, w, x, y, z, B, E, F, G } from "./loader-CXjYZgR0.js";
|
|
2
|
+
import { F as F2, a as a2, P as P2, b as b2, d as d2 } from "./font.plugin-CZBx3UOh.js";
|
|
3
|
+
import { l as loadFromPath } from "./load-from-path-CWtVz4o_.js";
|
|
4
|
+
import { r as r2 } from "./load-from-path-CWtVz4o_.js";
|
|
5
5
|
let unpluginInstance = null;
|
|
6
6
|
const createUnpluginTheme = async () => {
|
|
7
7
|
if (unpluginInstance) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AddColorsOptions } from '../color';
|
|
2
|
-
|
|
2
|
+
import { Hct } from '../material-color-utilities/htc';
|
|
3
3
|
import { PluginAbstract } from '../plugin';
|
|
4
4
|
import { Variant } from '../variant/variant';
|
|
5
5
|
import { PaletteCallback } from '../palette/palette';
|
|
6
|
+
import { Context } from '../context';
|
|
6
7
|
|
|
7
8
|
export interface ConfigInterface {
|
|
8
|
-
sourceColor: string;
|
|
9
|
+
sourceColor: string | Hct | ((context: Context) => string | Hct);
|
|
9
10
|
contrastLevel?: number;
|
|
10
11
|
isDark?: boolean;
|
|
11
12
|
variant?: Variant;
|
package/src/context/context.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { argbFromHex } from '@material/material-color-utilities';
|
|
2
2
|
import { Hct } from '../material-color-utilities/htc';
|
|
3
3
|
import { Variant } from '../variant/variant';
|
|
4
|
+
import { ConfigInterface } from '../config';
|
|
4
5
|
|
|
5
6
|
export interface ContextOptions {
|
|
6
|
-
sourceColor:
|
|
7
|
+
sourceColor: ConfigInterface['sourceColor'] | Hct;
|
|
7
8
|
contrastLevel: number;
|
|
8
9
|
isDark: boolean;
|
|
9
10
|
variant: Variant;
|
|
@@ -138,11 +139,17 @@ export class Context {
|
|
|
138
139
|
}
|
|
139
140
|
get sourceColor(): Hct {
|
|
140
141
|
let sourceColor = this.getOptions().sourceColor;
|
|
142
|
+
if (typeof sourceColor == 'function') {
|
|
143
|
+
sourceColor = sourceColor(this);
|
|
144
|
+
}
|
|
141
145
|
if (typeof sourceColor === 'string') {
|
|
142
146
|
sourceColor = Hct.fromInt(argbFromHex(sourceColor));
|
|
143
147
|
}
|
|
144
148
|
return sourceColor;
|
|
145
149
|
}
|
|
150
|
+
get rawSourceColor(): ContextOptions['sourceColor'] {
|
|
151
|
+
return this.getOptions().sourceColor;
|
|
152
|
+
}
|
|
146
153
|
|
|
147
154
|
set variant(variant: Variant) {
|
|
148
155
|
this.update({ variant });
|
|
@@ -85,8 +85,8 @@ export const createMinContrastToneAdjuster = (
|
|
|
85
85
|
const { selfKey, referenceKey } = options;
|
|
86
86
|
const minContrast =
|
|
87
87
|
ctx.contrastLevel >= 0
|
|
88
|
-
? normalize(ctx.contrastLevel, [0, 1], [
|
|
89
|
-
: normalize(ctx.contrastLevel, [-1, 0], [0,
|
|
88
|
+
? normalize(ctx.contrastLevel, [0, 1], [3, 7])
|
|
89
|
+
: normalize(ctx.contrastLevel, [-1, 0], [0, 3]);
|
|
90
90
|
|
|
91
91
|
const referenceTone = referenceKey
|
|
92
92
|
? colors.get(referenceKey).getTone()
|