From d92a4778929c6b9f0742ca648c652b436dffb8ea Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 21 Jan 2025 11:38:32 -0800 Subject: [PATCH] Add darker color to accent --- Client/src/Utils/Theme/constants.js | 6 ++++++ Client/src/Utils/Theme/extractColorObject.js | 1 + Client/src/Utils/Theme/globalTheme.js | 3 +-- Client/src/Utils/Theme/lightTheme.js | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Client/src/Utils/Theme/constants.js b/Client/src/Utils/Theme/constants.js index 7d9f8c8b2..11357e06d 100644 --- a/Client/src/Utils/Theme/constants.js +++ b/Client/src/Utils/Theme/constants.js @@ -128,6 +128,12 @@ const newSemanticColors = { light: lighten(newColors.blueBlueWave, 0.2), //CAIO_REVIEW dark: lighten(newColors.blueBlueWave, 0.2), //CAIO_REVIEW }, + darker: { + // CAIO_REVIEW + light: darken(newColors.blueBlueWave, 0.2), // CAIO_REVIEW + dark: darken(newColors.blueBlueWave, 0.2), // CAIO_REVIEW + }, + contrastText: { light: newColors.offWhite, dark: newColors.offWhite, diff --git a/Client/src/Utils/Theme/extractColorObject.js b/Client/src/Utils/Theme/extractColorObject.js index 09b6d66dc..bfd1a5aff 100644 --- a/Client/src/Utils/Theme/extractColorObject.js +++ b/Client/src/Utils/Theme/extractColorObject.js @@ -9,6 +9,7 @@ function extractThemeColors(themeType, colorObject) { } if ("light" in obj && "dark" in obj) { + // CAIO_REVIEW: This will break if the root object has light and dark properties return obj[themeType]; // Return the value for the specified theme } diff --git a/Client/src/Utils/Theme/globalTheme.js b/Client/src/Utils/Theme/globalTheme.js index ff523ae9a..12c377b3e 100644 --- a/Client/src/Utils/Theme/globalTheme.js +++ b/Client/src/Utils/Theme/globalTheme.js @@ -49,8 +49,7 @@ const baseTheme = (palette) => ({ props: (props) => props.color === "accent", style: { "&:hover": { - color: theme.palette.accent.main, - backgroundColor: theme.palette.accent.contrastText, + backgroundColor: theme.palette.accent.darker, }, }, }, diff --git a/Client/src/Utils/Theme/lightTheme.js b/Client/src/Utils/Theme/lightTheme.js index f44c2f5b8..1cbc3eb9b 100644 --- a/Client/src/Utils/Theme/lightTheme.js +++ b/Client/src/Utils/Theme/lightTheme.js @@ -4,7 +4,7 @@ import { /* colors, */ newSemanticColors } from "./constants"; import { extractThemeColors } from "./extractColorObject"; const palette = extractThemeColors("light", newSemanticColors); - +console.log(palette); const lightTheme = createTheme({ palette, ...baseTheme(palette),