Color Palette System
Advanced color management with automatic shade generation and Oxygen integration.
OxyMade’s Color Palette System provides comprehensive color management with automatic shade generation, CSS variables, and real-time Oxygen synchronization.
Overview
The color system generates a complete palette from a single primary color:
- 5 semantic colors: Primary, Secondary, Tertiary, Accent, Neutral
- 11 shades per color: From background (50) to dark (950)
- 2 base colors: White and Black with RGB values
- Automatic generation: Secondary, Tertiary, and Accent colors derived from Primary
Color Structure
Semantic Colors
| Color | Description | Generation |
|---|---|---|
| Primary | Main brand color | User-defined |
| Secondary | Complementary color | Hue rotated 180° from Primary |
| Tertiary | Supporting color | Hue rotated 120° from Primary |
| Accent | Highlight color | Hue rotated 240° from Primary |
| Neutral | UI/text color | Primary hue with 8% saturation |
Shade System
Each semantic color includes 11 shade variants:
| Shade | Alias | Usage |
|---|---|---|
bg | 50 | Background, lightest variant |
surface | 100 | Surface backgrounds |
subtle | 200 | Subtle elements |
border | 300 | Border colors |
muted | 400 | Muted text/elements |
base | 500 | Default/base color |
hover | 600 | Hover states |
text | 700 | Text on light backgrounds |
active | 800 | Active/pressed states |
heading | 900 | Headings |
dark | 950 | Darkest variant |
Using Colors
CSS Variables
Access colors in your CSS:
/* Base colors */
.element {
color: var(--primary);
background: var(--bg-primary);
}
/* Shade variants */
.card {
background: var(--surface-neutral);
border-color: var(--border-neutral);
}
/* Hover states */
.button:hover {
background: var(--hover-primary);
}
Oxygen Variables
In Oxygen’s interface, use the {var- prefix:
{var-primary}
{var-bg-secondary}
{var-text-neutral}
These appear in Oxygen’s variable picker after syncing.
RGB Values
For alpha transparency, use RGB value variables:
.overlay {
background: rgba(var(--primary-rgb-vals), 0.5);
}
Available RGB variables:
--primary-rgb-vals--secondary-rgb-vals--tertiary-rgb-vals--accent-rgb-vals--neutral-rgb-vals--base-white-rgb-vals--base-black-rgb-vals
Color Panel
Access the color panel in the Oxygen editor toolbar for real-time editing:
- Open Oxygen Builder
- Click the OxyMade button in the toolbar
- Use the color picker to adjust your primary color
- See shade variants update in real-time
- Save to sync with Oxygen
Color Picker Features
- Spectrum color picker for precise color selection
- Hex input for exact values
- Real-time preview of all generated shades
- Import/Export palette configurations
Syncing with Oxygen
Manual Sync
- Go to OxyMade settings
- Click Sync Colors with Oxygen
- Wait for confirmation
- Variables are now available in Oxygen
Automatic Sync
Enable the “Sync with Oxygen” toggle in settings:
- Changes to your palette automatically update Oxygen variables
- Rate limited to 10 saves per minute for performance
Sync Modes
| Mode | Behavior |
|---|---|
| Add New | Only adds missing variables |
| Update | Updates existing, adds new |
| Replace | Replaces all Oxygen color variables |
Best Practices
Choosing a Primary Color
- Start with your brand’s main color
- Check that generated shades have sufficient contrast
- Test on both light and dark backgrounds
- Verify accessibility of text shades
Using Semantic Names
/* Good - semantic usage */
.button {
background: var(--primary);
}
/* Avoid - hardcoded colors */
.button {
background: #6366f1;
}
Dark Mode Considerations
The shade system is designed for light mode. For dark mode:
- Invert the shade scale usage
bgbecomes your darkest backgrounddarkbecomes your lightest element
Color Palette Data
OxyMade stores color data in two formats:
Structured Palette
{
"primary": {
"base": "#6366f1",
"shades": {
"bg": "#f5f5ff",
"surface": "#ededff",
...
}
}
}
Flat Palette
A lookup dictionary for quick access:
{
"primary": "#6366f1",
"bg-primary": "#f5f5ff",
"surface-primary": "#ededff",
...
}
Troubleshooting
Colors Not Showing in Oxygen
- Verify variables are synced (check settings)
- Clear Oxygen’s cache
- Refresh the builder page
- Re-sync variables
Shades Look Wrong
- Check your primary color’s saturation
- Very low saturation colors may not generate visible shade differences
- Consider using a more saturated base color
Sync Conflicts
If other plugins define similar variables:
- Use OxyMade’s “Add New” sync mode
- Manually review variable names in Oxygen
- Consider namespacing custom variables