Skip to main content

Color System

MYMUSICK uses CSS custom properties (CSS variables) to create a flexible, maintainable color system. This approach enables easy theming and consistent color usage across components.

Design Tokens

Primary Colors

The original theme uses a vibrant, high-contrast color palette designed for maximum visual impact.
:root {
  --primary: #04CDA8;    /* Teal - Primary brand color */
  --accent: #FF5757;     /* Coral Red - Accent highlights */
  --bg-dark: #111;       /* Dark Gray - Background */
  --text-light: white;   /* White - Text color */
}

Color Usage Map

TokenHex ValueUsage
--primary#04CDA8Header background, sidebar links hover
--accent#FF5757Title text, borders, scrollbar, player buttons
--bg-dark#111Sidebar, cards, input backgrounds
--text-lightwhiteBody text, button text

Color Palette

Primary: #04CDA8

Vibrant teal for primary actions and header

Accent: #FF5757

Coral red for emphasis and interactive elements

Background: #111

Dark gray for surfaces and containers

Text: #FFFFFF

Pure white for maximum contrast

Color Application Examples

Header Component

header {
  background: var(--primary);              /* #04CDA8 teal */
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.title {
  color: var(--accent);                    /* #FF5757 coral */
}

.search {
  border: 2px solid var(--accent);         /* #FF5757 border */
  background: black;
  color: white;
}

.search:focus {
  box-shadow: 0 0 10px rgba(255,87,87,0.5); /* Accent glow */
}

Interactive States

.bttlg {
  border: 2px solid var(--accent);      /* #FF5757 border */
  background: black;
  color: white;
}

.bttlg:hover {
  background: white;                    /* Invert colors */
  color: black;
  transform: scale(1.05);               /* Grow slightly */
}

Opacity & Transparency

Original Theme

header {
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);      /* Header shadow */
}

.search:focus {
  box-shadow: 0 0 10px rgba(255,87,87,0.5);    /* Accent glow */
}

.sidebar {
  box-shadow: 2px 0 10px rgba(0,0,0,0.5);      /* Sidebar depth */
}

Formal Theme

header {
  background: rgba(11,12,15,0.88);             /* 88% opacity */
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

footer.player {
  background: rgba(17,19,24,0.95);             /* 95% opacity */
  backdrop-filter: blur(20px);
}

:root {
  --border: rgba(255,255,255,0.07);            /* 7% white */
  --glow: rgba(232,255,71,0.18);               /* 18% accent */
}

.song::after {
  background: linear-gradient(135deg, 
    transparent 60%, 
    rgba(232,255,71,0.04)                      /* 4% accent tint */
  );
}

Scrollbar Customization

#results::-webkit-scrollbar {
  height: 8px;
}

#results::-webkit-scrollbar-thumb {
  background: var(--accent);              /* #FF5757 */
  border-radius: 4px;
}

#results::-webkit-scrollbar-track {
  background: var(--bg-dark);             /* #111 */
}

Best Practices

Use CSS Variables

Always reference colors via CSS variables, never hardcoded hex values (except in :root)

Maintain Contrast

Ensure text meets WCAG AA standards (4.5:1 ratio for body text)

Consistent Opacity

Use semantic opacity values: 7%, 18%, 88%, 95%

Test Both Themes

Verify new components work with both color systems
The formal theme includes more granular color tokens for complex UI patterns like glass morphism and layered surfaces.

Accessibility Considerations

Contrast Ratios

ThemeText on BackgroundRatioWCAG Level
Originalwhite on #11117.5:1AAA
Originalwhite on #04CDA83.2:1AA (Large text)
Formal#e8e6df on #0b0c0f14.8:1AAA
Formal#0b0c0f on #e8ff4713.2:1AAA
The original theme’s white text on teal background (header) falls below AA for normal-sized text. Use larger font sizes or bold weights in these areas.

Adding New Colors

To extend the color system:
1

Define in :root

Add your custom property to the :root selector:
:root {
  --custom-color: #hexvalue;
}
2

Use Semantic Naming

Name colors by function, not appearance:
  • Good: --error, --success, --warning
  • Bad: --red, --green, --orange
3

Apply Consistently

Reference the variable throughout your styles:
.error-message {
  color: var(--error);
  border-color: var(--error);
}

Build docs developers (and LLMs) love