Skip to content

Commit

Permalink
Fix determine-fill-style.ts.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhin committed Nov 13, 2023
1 parent 8d0c73a commit b692690
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/services/blend/determine-fill-style.ts
Original file line number Diff line number Diff line change
@@ -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 = (
Expand All @@ -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})`;
}

Expand Down

0 comments on commit b692690

Please sign in to comment.