The Dynamic Color Swatch system automatically extracts colors from focused Orb particles and applies them throughout the site as CSS variables.
- Color Extraction: Samples pixels from the currently focused Orb's canvas
- Palette Generation: Creates a 6-color palette from dominant particle colors
- Theme Fallback: Defaults to site dark/light theme when no Orb is focused
- CSS Variables: Applies colors as
--dynamic-color-1through--dynamic-color-6
:root {
--dynamic-color-1: #000000; /* Primary color */
--dynamic-color-2: #ffffff; /* Secondary color */
--dynamic-color-3: #0064c8; /* Accent color */
--dynamic-color-4: #6400c8; /* Supporting color */
--dynamic-color-5: #ff6b35; /* Highlight color */
--dynamic-color-6: #4ecdc4; /* Additional color */
--dynamic-rgb-1: 0,0,0; /* RGB format for filters */
--dynamic-rgb-2: 255,255,255;
--dynamic-rgb-3: 0,100,200;
--dynamic-rgb-4: 100,0,200;
--dynamic-rgb-5: 255,107,53;
--dynamic-rgb-6: 78,205,196;
}<h1 class="text-glow-dynamic">Dynamic Title</h1>
<p class="accent-dynamic">Accent text</p><button class="button-dynamic">Dynamic Button</button>
<a href="#" class="link-dynamic">Dynamic Link</a><div class="card-dynamic">
<h2 class="accent-dynamic">Card Title</h2>
<p>Card content with dynamic colors</p>
</div><div class="gradient-dynamic">Gradient background</div>
<div class="accent-bg-dynamic">Subtle accent background</div><input type="text" class="focus-dynamic" placeholder="Dynamic focus style">
<div class="glow-animation-dynamic">Animated glow effect</div>The system automatically detects:
- Dark Mode: Uses dark theme palette as fallback
- Light Mode: Uses light theme palette as fallback
- Orb Focus: Extracts colors from focused Orb particle system
- Focus Detection: Monitors carousel item focus changes
- Color Extraction: Samples Orb canvas every 2 seconds
- Theme Switching: Responds to dark/light mode changes
- Real-time Updates: CSS variables update immediately
- Use Semantic Classes: Apply
accent-dynamicfor emphasis,highlight-dynamic-3for primary actions - Combine Colors: Mix dynamic colors with static colors for hierarchy
- Consider Contrast: Ensure text remains readable against dynamic backgrounds
- Test Both Themes: Verify appearance in dark and light modes
.my-component {
background: linear-gradient(45deg,
var(--dynamic-color-1),
var(--dynamic-color-3));
border: 2px solid var(--dynamic-color-5);
box-shadow: 0 4px 16px rgba(var(--dynamic-rgb-3), 0.3);
}@media (max-width: 768px) {
.mobile-dynamic {
background: var(--dynamic-color-1);
color: var(--dynamic-color-2);
}
}- Fallback Colors: Always ensure readable contrast with dynamic colors
- Semantic Usage: Use consistent color hierarchy (primary, accent, highlight)
- Smooth Transitions: Leverage the built-in transition utilities
- Accessibility: Test color combinations for accessibility compliance
The system creates a cohesive, dynamic color experience that responds to user interaction with the Orb particle system!