Skip to content
Skills Library
Design & UX · Building & coding

dark-mode

/dark-mode

Use when adding dark mode, fixing a dark theme created by inversion, or when surfaces, shadows, and accent colors lose hierarchy after switching themes.

Licence
MIT
Last repository change
04.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 04.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when adding dark mode, fixing a dark theme created by inversion, or when surfaces, shadows, and accent colors lose hierarchy after switching themes.

Original author description

Use when adding dark mode, fixing a dark theme created by inversion, or when surfaces, shadows, and accent colors lose hierarchy after switching themes.

How it works

  1. When to use
  2. Inputs to ask for
  3. Workflow
  4. Decision rules
  5. Defaults
  6. Anti-patterns
  7. Pre-handoff checklist
  8. Example prompt
  9. Bahasa Indonesia
  10. Attribution
Original SKILL.md headings · 131 lines, 798 words
SKILL.md preview
---
name: dark-mode
description: Use when adding dark mode, fixing a dark theme created by inversion, or when surfaces, shadows, and accent colors lose hierarchy after switching themes.
description_id: Gunakan saat menambahkan dark mode, memperbaiki tema gelap hasil inversi, atau ketika permukaan, bayangan, dan warna aksen kehilangan hierarki setelah berganti tema.
version: 1.0.0
license: MIT
author: ui-skill-2045 contributors
category: interaction
themes: [soft-blue-neumorphism, glassmorphism, aurora-gradient, minimal-monochrome, brutalist-modern, cyber-neon, dark-neumorphism, bento-grid, editorial-serif, claymorphism, blueprint-grid]
tags: [dark-mode, theming, color, elevation, contrast, tokens]
source: https://github.com/nextlevelbuilder/ui-ux-pro-max-skill
original_author: Next Level Builder
original_license: MIT
upstream_commit: ccce51cba388476d4f403091ddb91636d5cd9fed
---

# Dark Mode

Dark mode is a second design, not a color filter.

## When to use

- Adding a theme switch.
- A dark theme exists but cards, borders, and text lose hierarchy.
- Shadows disappear, accents vibrate, or text becomes muddy.
- The theme flashes white on load.
- The user’s OS preference should be respected.

## Inputs to ask for

1. Dark-only, light-only, or both.
2. Whether to follow the OS by default.
3. Brand colors that must survive.
4. Whether the product is used at night, in low light, or on OLED screens.
5. Persistence requirement (local storage, account setting).

## Workflow

1. **Design the dark palette independently.** Start from a near-black ground with a hue (not
   `#000`), then raise surfaces with *lighter* tones.
2. **Replace shadows with tone steps.** In dark UI, elevation is communicated by lighter
   surfaces and subtle borders, not by dark shadows.
   ```css
   [data-theme="dark"] {
     --color-bg: #0f1726;
     --color-surface: #131d30;
     --color-surface-raised: #18243a;
     --color-border: #26344d;
     --shadow-raised: 8px 8px 18px #070c15, -8px -8px 18px #1e2c44;
   }
   ```
3. **Desaturate and lighten accents.** A saturated brand blue on dark vibrates; move it toward
   a lighter, slightly desaturated tint, then re-check contrast.
4. **Re-check every pair.** Text that passed on light may fail on dark, and vice versa.
5. **Set the theme before paint** to avoid a flash:
   ```html
   <script>
     const saved = localStorage.getItem("theme");
     const dark = saved ? saved === "dark" : matchMedia("(prefers-color-scheme: dark)").matches;
     document.documentElement.dataset.theme = dark ? "dark" : "light";
   </script>
   ```
6. **Expose the control.** A three-state switch (system / light / dark) is better than a binary
   toggle. Persist the choice and update `color-scheme`.
7. **Test images, illustrations, charts, and third-party embeds.** They often stay light and
   glow.
8. **Test in real low light** and on an OLED screen if possible.

## Decision rules

- **Do not use pure black** for large surfaces; it makes text vibrate and hides elevation.
- **Do not use pure white text** at 100% for long body copy on dark; `#e8eefb` is calmer.
- **Elevation = lighter surface**, not a bigger shadow.
- **Borders become more important** in dark mode; a 1px subtle border often replaces a shadow.
- **Images need a treatment**: slight brightness reduction or a subtle border. Do not invert
  photos.
- **Charts need dark-specific colors**, not the light palette at reduced opacity.
- **`color-scheme: dark`** makes native controls and scrollbars match.
- **Never invert the whole page.**

## Defaults

| Decision | Default |
|---|---|
| Ground | Near-black with hue, e.g. `#0f1726` |
| Surface step | +4–6% lightness |
| Body text | Off-white, e.g. `#e8eefb` |
| Muted text | ≥ 4.5:1 on ground |
| Accent | Lightened/desaturated variant |
| Elevation | Tone step + subtle border |
| Theme default | Follow OS |
| Persistence | localStorage + account preference |
| Native controls | `color-scheme: dark` |

## Anti-patterns

- `filter: invert(1)` or `invert(0.9) hue-rotate(180deg)`.
- Pure black with pure white text and saturated blue links.
- Dark shadows on dark backgrounds.
- The same accent hex in both themes.
- Light images with no border or treatment.
- A white flash before hydration.
- A toggle that does not persist.
- Charts with grid lines darker than the data.

## Pre-handoff checklist

- [ ] Dark palette designed independently, not inverted.
- [ ] Surface hierarchy readable without shadows.
- [ ] All text pairs pass 4.5:1.
- [ ] Focus ring visible on every dark surface.
- [ ] Accent re-tuned for dark.
- [ ] Images and charts have a dark treatment.
- [ ] No flash of light theme on load.
- [ ] Theme persists and can follow the OS.
- [ ] Native controls use `color-scheme`.

## Example prompt

> “Aplikasi kami punya light mode dan ingin menambah dark mode. Sekarang kalau dibalik, kartu
> jadi hilang dan biru brand menyilaukan.”

Expected result: an independently designed dark palette with lighter raised surfaces, a
desaturated accent that passes contrast, subtle borders replacing shadows, a pre-paint theme
script, and a three-state switch.

## Bahasa Indonesia

**Kapan dipakai:** saat menambah dark mode atau memperbaiki tema gelap hasil inversi.

**Langkah:** rancang palet gelap sendiri → ganti bayangan dengan langkah tone → turunkan
saturasi aksen → ukur ulang kontras → pasang tema sebelum paint → sediakan kontrol tiga state →
uji gambar, grafik, dan kontrol native.

**Default:** ground near-black berwarna, surface +4–6% lebih terang, teks off-white, elevation
lewat tone + border, ikuti OS secara default.

**Larangan:** `filter: invert()`, hitam murni dengan putih murni, bayangan gelap di atas gelap,
aksen yang sama di kedua tema, flash putih saat load, toggle tanpa persistensi.

## Attribution

Ditulis ulang dari `nextlevelbuilder/ui-ux-pro-max-skill` (MIT, Next Level Builder). Teks
lisensi asli: `LICENSE-UPSTREAM-nextlevelbuilder.txt`. Perubahan: ditambahkan strategi elevasi,
skrip pre-paint, dan checklist.
Files in this package (4)
  • LICENSE-UPSTREAM 1 KB
  • MODIFICATIONS.md 1 KB
  • SKILL.md 6 KB
  • preview/index.html 17 KB

Versions

RepositoryScoreLicence
This page · dresar/ui-skill-2045100MIT
FrancoStino/opencode-skills-collection100MIT
sickn33/agentic-awesome-skills100MIT
egregore-labs/egregore100MIT
arnavpuri/designskills100MIT
Amey-Thakur/AI-SKILLS90MIT
egregore-labs/egregore86MIT

Database snapshot: 13.11.2026 · package version 3a2483d0af40 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100dark-mode-design
    Build a dark theme with correct elevation, surface hierarchy, and contrast. Use when adding dark mode to a product, or when an existing dark theme looks flat, muddy or hard to read.
  • 90youmair-dark-mode-design
    Design effective dark mode interfaces with proper surface elevation hierarchy, color adaptation, contrast, and desaturated accents. Use when configuring dark themes and surface luminance.
  • 90tone-theme
    Build or fix a theming system — dark mode, multi-brand, or white-label token swap. Use when asked to "add dark mode", "set up multi-brand theming", or "white-label the UI".
  • 100adaptive-dark-mode
    Audit a website's theming and make it ready for Safari's Adaptive Dark Mode (Safari 27.3+), which automatically darkens light sites that don't declare dark-mode support. Use this whenever the user mentions Adaptive Dark Mode, Safari's automatic or forced dark mode,…
  • 86skein-theme
    Change how the app looks — switch the theme style, change colors / radius / density, dark mode, or write a theme style of its own. Use for any request about colors, look and feel, branding or theming.
  • 100theming
    Use when building a theme or theming system for an interface. Covers token architecture, dark mode, contrast preservation across themes, and generating a coherent palette from a seed colour. Trigger on "add dark mode", "contrast breaks in dark mode", "white-label this app",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.