fundon
2025-03-13 13:15:40 +00:00
parent 8783859dd1
commit 341321284e
2 changed files with 5 additions and 3 deletions

View File

@@ -72,7 +72,8 @@ export const ShapeSettings = () => {
const { palettes: textColorPalettes, getCurrentColor: getCurrentTextColor } = const { palettes: textColorPalettes, getCurrentColor: getCurrentTextColor } =
usePalettes( usePalettes(
DefaultTheme.ShapeTextColorShortPalettes, DefaultTheme.ShapeTextColorShortPalettes,
DefaultTheme.shapeTextColor DefaultTheme.shapeTextColor,
true
); );
const [currentShape, setCurrentShape] = useState<ShapeName>(ShapeType.Rect); const [currentShape, setCurrentShape] = useState<ShapeName>(ShapeType.Rect);

View File

@@ -17,13 +17,14 @@ export const useResolvedTheme = () => {
export const usePalettes = ( export const usePalettes = (
originalPalettes: Palette[], originalPalettes: Palette[],
defaultColor: Color defaultColor: Color,
isShapeText = false
) => { ) => {
const theme = useResolvedTheme(); const theme = useResolvedTheme();
const isDark = theme === ColorScheme.Dark; const isDark = theme === ColorScheme.Dark;
const palettes = originalPalettes.map(({ key, value }) => { const palettes = originalPalettes.map(({ key, value }) => {
// Title needs to be inverted. // Title needs to be inverted.
if (isDark) { if (!isShapeText && isDark) {
if (key === 'Black') { if (key === 'Black') {
key = 'White'; key = 'White';
} else if (key === 'White') { } else if (key === 'White') {