Theme Colors
How to customize the app's color scheme
Customizing Theme Colors
This guide explains how to customize the app's colors for both light and dark modes.
Where to Change Colors
You need to modify two files to completely change the app's color scheme:
/master-app/tailwind.config.js
- For styling with Tailwind classes/master-app/app/contexts/ThemeColors.tsx
- For components using direct styles
Current Color Palette
The app uses these main colors:
Name | Light Mode | Dark Mode | Usage |
---|---|---|---|
primary | #ffffff (White) | #14212D (Dark Blue) | Main backgrounds |
secondary | #E2E8F0 (Light Gray) | #324650 (Gray-Blue) | Secondary backgrounds, inputs |
highlight | #0EA5E9 (Blue) | #0EA5E9 (Blue) | Accents, buttons |
Step 1: Update Tailwind Config
1. Open the configuration file
Open the file master-app/tailwind.config.js
in your code editor.
2. Locate the colors section
Find the colors
section in the configuration file:
3. Change the color values
Simply replace the color hex values with your preferred colors:
- To change the accent color: Update the
highlight
value - To change light mode colors: Update values in the
light
object - To change dark mode colors: Update values in the
dark
object
For example, to change the accent color to purple and the light mode background to light blue:
Step 2: Update Theme Colors Context
You must also update the direct color values in the ThemeColors context:
1. Open the ThemeColors file
Open the file master-app/app/contexts/ThemeColors.tsx
in your code editor.
2. Locate the color definitions
Find the useThemeColors
hook that defines the color values:
3. Update the color values
Change the color values to match those you set in the tailwind.config.js file:
Step 3: Save and restart
After saving both files, restart your development server for the changes to take effect.
Tips for Choosing Colors
- Maintain contrast: Ensure text is readable against backgrounds
- Keep highlight colors consistent: Use the same highlight color in both light and dark modes
- Test both themes: Check how your colors look in both light and dark modes
- Keep both files in sync: Make sure the colors in tailwind.config.js and ThemeColors.tsx match
Color Variables Reference
In tailwind.config.js:
highlight
: Main accent color for buttons and interactive elementslight.primary
: Main background color in light modelight.secondary
: Secondary background color in light modelight.text
: Main text color in light modelight.subtext
: Secondary text color in light modedark.primary
: Main background color in dark modedark.secondary
: Secondary background color in dark modedark.text
: Main text color in dark modedark.subtext
: Secondary text color in dark mode
In ThemeColors.tsx:
bg
: Primary background colorsecondary
: Secondary background colorhighlight
: Accent color for buttons and interactive elementstext
: Primary text colorborder
: Border colorplaceholder
: Placeholder text color