canon-dark-mode

canon-dark-mode is a skill for Claude Code, Codex from Dragoon0x/canon. It costs 68 tokens per session (1,111 once invoked), scanned A, original, MIT.

A set of guidelines for designing and building dark-coloured interface themes, including how to adjust brightness, layers, contrast, and browser theme detection.

In plain words
What is it for?
Use it when adding dark mode, a night mode, a theme switcher, or support for the browser’s preferred colour scheme.
Why use it?
It helps avoid dark themes that are too black, hard to read, or use shadows and colours that do not separate interface layers clearly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding dark mode, a night mode, a theme switcher, or support for the browser’s preferred colour scheme.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dragoon0x/canon/canon-dark-mode
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Dragoon0x/canon --skill canon-dark-mode
Clone the repo
git clone --depth 1 https://github.com/Dragoon0x/canon

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for canon-dark-mode

README.md
[![agentmods](https://agentmods.dev/badge/skills/dragoon0x/canon/canon-dark-mode/github.svg)](https://agentmods.dev/skills/dragoon0x/canon/canon-dark-mode)
Your own site
<a href="https://agentmods.dev/skills/dragoon0x/canon/canon-dark-mode"><img src="https://agentmods.dev/badge/skills/dragoon0x/canon/canon-dark-mode/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for canon-dark-mode

Your own site · 80×15
<a href="https://agentmods.dev/skills/dragoon0x/canon/canon-dark-mode"><img src="https://agentmods.dev/badge/skills/dragoon0x/canon/canon-dark-mode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,111 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.01111
Opus 5 $0.00034 $0.00556
Sonnet 5 $0.00014 $0.00222
Haiku 4.5 $0.00007 $0.00111

Measured 10d ago against content hash 00c7305a88d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

canon-dark-mode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

source/skills/canon-dark-mode/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CANON · Dark Mode

Dark mode is a lightness inversion, not a hue shift. Every decision traces back to that principle.

The inversion rule

Light mode text at L=10% becomes dark mode text at L=90%. Background at L=98% becomes L=8–12%. Hue and chroma stay roughly the same. Saturation may need a slight bump because colors on dark backgrounds perceptually desaturate.

Light mode:       Dark mode:
bg    L=98%  →    bg    L=8–12%
text  L=10%  →    text  L=90–95%
muted L=45%  →    muted L=55–60%

Surface stacking

In light mode, elevation means shadows. In dark mode, elevation means lighter surfaces. Each layer bumps lightness 2–4%.

Layer Light mode Dark mode
Base L=98% L=8%
Surface 1 (card) L=100% L=12%
Surface 2 (popover) L=100% + shadow L=16%
Surface 3 (modal) L=100% + deeper shadow L=20%

Shadows in dark mode are nearly invisible. Don't rely on them for separation. Use surface lightness instead.

Never use pure black

#000000 as a background causes halation (white text blooms on OLED). Start at oklch(8% 0.01 <hue>) minimum. Tint the dark background slightly toward your brand hue for warmth.

Semantic tokens — required

Hard-coded hex values break dark mode. Every color reference must go through a semantic token that resolves differently per scheme.

:root {
  --color-bg: oklch(98% 0.005 250);
  --color-text: oklch(10% 0.02 250);
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: oklch(10% 0.01 250);
    --color-text: oklch(92% 0.01 250);
  }
}

Contrast re-audit

Every text-on-background pair passes 4.5:1 in both modes. Don't assume passing in light means passing in dark. Medium-lightness brand colors (L=50–60%) often fail against both extremes.

Images and media

  • Photos: usually fine. Maybe add a subtle filter: brightness(0.85) to reduce glare.
  • Diagrams with white backgrounds: add dark-mode variants or use CSS filter: invert(1) hue-rotate(180deg) with care.
  • Logos: provide dark-mode variant or use currentColor SVG.
  • Shadows on images: drop shadow values for dark mode because they're invisible anyway.

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 115 lines · 68 tokens per session scan A 00c7305a88d6

Subscribe to this mod's changes

canon-dark-mode is a skill published in the GitHub repository Dragoon0x/canon (5 stars, last pushed 4mo ago), licensed MIT. It adds 68 tokens to every session and 1,111 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

accessibility

Use when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast, tap-target size. NOT palette or visual intent (that is design), NOT test-runner setup (that is testing-web), NOT LCP/page-speed (that is…

ericrisco/rsc-harness · 86 tokens

token-architecture

Design token architecture — multi-tier token systems, semantic naming, theme switching, CSS custom properties, Tailwind mapping, and Figma variable sync.

memi-design/design-skills · 32 tokens

memoire-design-tooling

Set up and operate Mémoire's CLI, MCP server, agent kits, design preflight, UX audits, craft checks, tokens, and registry evidence. Use when a repository explicitly needs Mémoire tooling; use portable design skills when Mémoire is unavailable.

memi-design/design-skills · 57 tokens

better-ui

Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, micro-interactions, enter/exit animations, or any visual detail work. Triggers on UI polish, design details, "make it feel better"…

memi-design/design-skills · 82 tokens

accessibility

Accessibility (a11y) workflow skill. Use this skill when the user needs Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible". Do NOT use for SEO (use seo)…

diegosouzapw/awesome-omni-skills · 119 tokens

color-contrast-auditor

Detects and fixes color contrast violations using WCAG 2.1 guidelines and perceptual analysis. Expert in contrast ratio calculation, color blindness simulation, and providing accessible alternatives. Activate on "check contrast", "color accessibility", "WCAG audit", "readability check", "contrast ratio", "hard to…

curiositech/windags-skills · 116 tokens