diff --git a/modules/color-system/lib/color-manipulation.ts b/modules/color-system/lib/color-manipulation.ts index 3a1dce5..841fd4a 100644 --- a/modules/color-system/lib/color-manipulation.ts +++ b/modules/color-system/lib/color-manipulation.ts @@ -36,7 +36,7 @@ export function parseColor(color: string | Color): Required { export function formatColorAsOklch(color: string | Color): string { try { - const parsed = formatCss(color) + const parsed = formatCss(parseColor(color)) if (!parsed) { throw new Error(`Cannot format color: ${JSON.stringify(color)}`) } diff --git a/modules/color-system/lib/generate-color-tokens.ts b/modules/color-system/lib/generate-color-tokens.ts index b2fdf58..318f1f1 100644 --- a/modules/color-system/lib/generate-color-tokens.ts +++ b/modules/color-system/lib/generate-color-tokens.ts @@ -8,7 +8,7 @@ export type GeneratedColorTokens = { semanticColors: ExtendedTheme['semanticTokens']['colors'] } -export default function generateColorTokens2(config: ColorSystemConfig): GeneratedColorTokens { +export default function generateColorTokens(config: ColorSystemConfig): GeneratedColorTokens { const tokens: GeneratedColorTokens = { colors: {}, semanticColors: {},