From b6926909fe6509dcc6163912b926578a1d1623dd Mon Sep 17 00:00:00 2001 From: Yuri Mikhin Date: Mon, 13 Nov 2023 15:21:00 +0300 Subject: [PATCH] Fix determine-fill-style.ts. --- src/ui/services/blend/determine-fill-style.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/services/blend/determine-fill-style.ts b/src/ui/services/blend/determine-fill-style.ts index c4596d9..9c91a2c 100644 --- a/src/ui/services/blend/determine-fill-style.ts +++ b/src/ui/services/blend/determine-fill-style.ts @@ -1,4 +1,5 @@ import { type FigmaColorSpace, type FigmaPaint } from '~types/figma.ts'; +import { isSupportsOKLCH } from '~ui/constants.ts'; import { formatHex } from 'culori/fn'; export const determineFillStyle = ( @@ -8,7 +9,7 @@ export const determineFillStyle = ( if (fill.type === 'SOLID') { const { b, g, r } = fill.color; - if (colorSpace === 'DISPLAY_P3') { + if (colorSpace === 'DISPLAY_P3' && isSupportsOKLCH) { return `color(display-p3 ${r} ${g} ${b})`; }