skills/dark-mode-design-expert/SKILL.md
--- license: Apache-2.0 category: Design & Creative tags: - dark-mode - theming - design - accessibility - contrast --- # Dark Mode Design Expert Master dark mode UI design with atmospheric theming, WCAG accessibility, and cross-platform best practices. Specializes in weather/sky/ocean-inspired color systems that adapt to time of day and environmental conditions. ## Decision Points ### When Dark Mode is Right for the User ``` IF user environment = bright (outdoor/office) AND devic
npx skillsauth add curiositech/windags-skills skills/dark-mode-design-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Master dark mode UI design with atmospheric theming, WCAG accessibility, and cross-platform best practices. Specializes in weather/sky/ocean-inspired color systems that adapt to time of day and environmental conditions.
IF user environment = bright (outdoor/office) AND device ≠ OLED
→ Recommend light mode (better readability)
ELSE IF user environment = low light (evening/bedroom)
→ Activate dark mode (reduce eye strain)
ELSE IF device = OLED AND battery concern = high
→ Suggest dark mode (39-47% power savings at max brightness)
ELSE IF user has astigmatism flags (accessibility preference)
→ Default to light mode (dark text prevents halation)
ELSE
→ Respect system preference (prefers-color-scheme)
FOR text content:
IF text size ≥ 24px (large text)
→ Target 4.5:1 minimum, 7:1 ideal
ELSE IF body text
→ Target 7:1+ (AAA compliance)
ELSE IF disabled/decorative
→ 3:1 acceptable
FOR interactive elements:
IF primary action button
→ 4.5:1+ against background
ELSE IF border/icon
→ 3:1+ minimum
IF theme = light mode
→ Use box-shadow for elevation
→ Shadows = rgba(0,0,0,0.1-0.3)
ELSE IF theme = dark mode
→ Use lighter surface colors
→ Each level = base + 5-11% white overlay
→ NO shadows (invisible on dark)
ELSE IF theme = atmospheric (storm/night)
→ Use colored glow effects
→ box-shadow with theme accent color
IF switching light → dark:
IF color lightness > 70%
→ Increase saturation 10-20%
→ Reduce lightness to 40-60%
IF color is brand primary
→ Use 400-level instead of 600-level
→ Test against dark background
IF color is gray/neutral
→ Invert but avoid pure white/black
→ Use #f1f5f9 instead of #ffffff
ELSE IF switching dark → light:
→ Reverse above rules
→ Test readability on white background
Symptoms: Background is #000000, text is #ffffff, harsh contrast Detection: Check if background HSL lightness = 0% Fix: Replace with near-black (#0c1222, #121212) and off-white (#f1f5f9)
Symptoms: Cards have no elevation in dark mode, UI feels flat Detection: box-shadow values unchanged between themes Fix: Replace shadows with lighter surface colors in dark mode
/* Wrong */
.card { box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
/* Right */
:root.theme-dark .card {
background: var(--surface-elevated);
box-shadow: none;
}
Symptoms: Colors look washed out or invisible in dark mode Detection: Same hex values used in both themes Fix: Manually adjust each color for its new background context
Symptoms: Page loads light, then flashes to dark after 100-200ms
Detection: Theme change visible during page load
Fix: Inline blocking script in <head> before any CSS:
<script>
(function(){
if(localStorage.theme==='dark')
document.documentElement.classList.add('theme-dark');
})();
</script>
Symptoms: App forces one theme regardless of user's OS setting
Detection: No prefers-color-scheme media queries
Fix: Default to system preference, allow manual override
Scenario: Building a weather app that shows current conditions with background that matches the weather and time of day.
User Context:
Decision Process:
Implementation:
/* Night + Clear Weather */
:root.atmosphere-night-clear {
--bg-primary: #0c1222; /* Deep navy, not pure black */
--bg-elevated: #1a1f3a; /* Lighter for cards */
--text-primary: #f1f5f9; /* Off-white, not pure white */
--accent: #22d3ee; /* Cyan for bioluminescent feel */
/* Starry effect */
background-image: radial-gradient(
circle at 20% 30%, rgba(34, 211, 238, 0.1) 0%, transparent 50%
);
}
What novice would miss:
Expert catches:
Scenario: Enterprise dashboard needs to support users with astigmatism (prefer light mode) and users with light sensitivity (prefer dark mode).
Conflict: Astigmatism users experience "halation" (text bleeding) in dark mode, while light-sensitive users get eye strain from light mode.
Decision Process:
prefers-reduced-contrast and user-set preferencesImplementation:
/* Medium contrast theme */
:root.theme-accessible {
--bg-primary: #1e293b; /* Not too dark */
--bg-elevated: #334155; /* Clear hierarchy */
--text-primary: #e2e8f0; /* Not pure white */
--contrast-ratio: 12:1; /* Between 7:1 and 21:1 */
}
/* High contrast escape hatch */
:root.theme-high-contrast {
--bg-primary: #000000;
--text-primary: #ffffff;
--contrast-ratio: 21:1;
}
Expert considerations:
Scenario: Mobile news app user reports poor battery life, but switching to dark mode makes article text harder to read.
Analysis:
Decision Process:
Implementation:
/* Brightness-adaptive contrast */
:root.brightness-high {
/* Higher contrast for outdoor reading */
--text-primary: #000000; /* Pure black for maximum contrast */
--bg-primary: #ffffff; /* Pure white background */
}
:root.brightness-low {
/* Lower contrast for indoor comfort */
--text-primary: #f1f5f9;
--bg-primary: #0c1222;
}
What novice would miss:
Expert solution:
This skill handles dark mode implementation. For other needs:
color-theory-palette-harmony-expert insteadtypography-expert for font selection and sizingdesign-system-creator for broader architecturecolor-contrast-auditor for testing color pairsweb-design-expert for overall visual directionfrontend-expert for theme transition animationsDelegate when you see:
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.