diff options
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r-- | src/client/views/PropertiesView.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index fb2d811f4..86784d467 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -41,6 +41,7 @@ import './PropertiesView.scss'; import { DefaultStyleProvider } from './StyleProvider'; import { FaFillDrip } from 'react-icons/fa'; import { GeneratedResponse } from '../apis/gpt/customization'; +import { ExtractColors } from './ExtractColors'; const _global = (window /* browser */ || global) /* node */ as any; interface PropertiesViewProps { @@ -1191,8 +1192,8 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { ? this.generatedStyles.map((style, i) => ( <div className="propertiesView-palette" style={{ display: 'flex', gap: '4px', backgroundColor: this.selectedStyle === i ? StrCast(Doc.UserDoc().userVariantColor) : '#00000000' }} onClick={() => this.styleCollection(i)}> <div style={{ width: '24px', height: '24px', backgroundColor: style.collectionBackgroundColor, borderRadius: '2px' }}></div> - {style.documentsWithColors.map(c => ( - <div style={{ width: '24px', height: '24px', backgroundColor: c.color, borderRadius: '2px' }}></div> + {ExtractColors.sortColors(style.documentsWithColors.map(doc => ExtractColors.hexToFinalColor(doc.color))).map(c => ( + <div style={{ width: '24px', height: '24px', backgroundColor: c.hex, borderRadius: '2px' }}></div> ))} </div> )) |