From ef19372d8c94925ae5358b732659be02c6783380 Mon Sep 17 00:00:00 2001 From: "Samuel M. Bednarz" Date: Fri, 29 Dec 2023 23:36:26 +0100 Subject: [PATCH] fix naming --- packages/core/engine/primitives/color.ts | 6 +++--- packages/core/engine/primitives/utils.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/core/engine/primitives/color.ts b/packages/core/engine/primitives/color.ts index 63440b8..c745f3c 100644 --- a/packages/core/engine/primitives/color.ts +++ b/packages/core/engine/primitives/color.ts @@ -2,7 +2,7 @@ import { colord, Colord, extend } from 'colord' import mixPlugin from 'colord/plugins/mix' import { APCAcontrast, sRGBtoY } from 'apca-w3' import { UmbraAdjusted } from '../types' -import { settings } from '../defaults' +import { defaultSettings } from '../defaults' extend([mixPlugin]) @@ -27,8 +27,8 @@ interface MoveAwayFrom { } const stored = { - readability: settings.readability || 11, - iterations: settings.iterations || 15 + readability: defaultSettings.readability || 11, + iterations: defaultSettings.iterations || 15 } function apcaContrast(fg: string | Colord, bg: string | Colord) { diff --git a/packages/core/engine/primitives/utils.ts b/packages/core/engine/primitives/utils.ts index 2c432b2..1892e37 100644 --- a/packages/core/engine/primitives/utils.ts +++ b/packages/core/engine/primitives/utils.ts @@ -1,7 +1,7 @@ import { colord, Colord } from 'colord' import { UmbraInput, UmbraSettings } from '../types' import { getReadability } from './color' -import { settings } from '../defaults' +import { defaultSettings } from '../defaults' interface RandomSettings extends UmbraSettings { amount: number @@ -19,7 +19,7 @@ function randomHex() { export function randomScheme(randomSettings: RandomSettings = { amount: 1 }): UmbraInput { return { - settings: { ...settings, ...randomSettings }, + settings: { ...defaultSettings, ...randomSettings }, scheme: { background: randomHex(), foreground: randomHex(),