ux-theming

Registers VS Code theme colors and styles widgets with theme tokens and high-contrast support.

10|1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill ux-theming-kevinhuangislearning
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ux-theming
Source: https://github.com/KevinHuangIsLearning/shortestpath-ide/tree/main/.github/skills/ux-theming
Command: npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill ux-theming-kevinhuangislearning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? VS Code extension and workbench contributors often hardcode colors, shadows, and borders that break in dark, light, or high-contrast themes and get flagged in code review. This Skill provides the exact patterns for registering theme-aware colors, styling widgets, and meeting focus and high-contrast requirements. ## Core Features & Use Cases - Color Registration: Register colors with defaults for all four theme types (light, dark, hcDark, hcLight) using registerColor in colorUtils.ts, with transforms like transparent(), darken(), and lighten(). - Widget Style Patterns: Apply default widget style objects (defaultButtonStyles, defaultInputBoxStyles, etc.) and override specific colors via factory functions in defaultStyles.ts. - Focus & High-Contrast Compliance: Implement focus indicators with var(--vscode-focusBorder), trap focus in modal dialogs, and replace box shadows with contrastBorder in HC themes. - Use Case: When adding a new custom widget to the workbench, use this Skill to register its colors, wire CSS variables, and pass HC/focus review without hardcoded values. ## Quick Start Ask the assistant to register a new theme color for a custom widget and style it following VS Code theming and high-contrast rules.

Frequently Asked Questions about ux-theming

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register a new theme color in VS Code?▼

Use registerColor from colorUtils.ts with a color ID, defaults for all four theme types (light, dark, hcDark, hcLight), and a localized description. Reference existing colors or use transforms like transparent() and darken() for derived values.

How do I use VS Code theme colors in CSS?▼

Registered colors are injected as CSS custom properties on .monaco-workbench, so a color like editor.background becomes var(--vscode-editor-background). In TypeScript, use asCssVariable(colorId) from colorUtils.ts to generate the reference.

What are the high contrast theme requirements for VS Code widgets?▼

Always provide hcDark and hcLight defaults, use Color.black and Color.white for HC backgrounds, and reference contrastBorder for borders. Box shadows must be removed in HC mode and replaced with a contrastBorder outline.

How do I style a focus indicator in VS Code?▼

Use outline with var(--vscode-focusBorder), outline-offset of -1px, and suppress the ring on :active. Never hardcode a focus color; use the .synthetic-focus class for programmatic focus and dashed borders for toggle buttons.

Why do reviewers flag hardcoded colors in VS Code contributions?▼

Hardcoded hex or rgba values break in dark, light, and high-contrast themes. All colors, shadows, and borders must come from registered color tokens or CSS variables like var(--vscode-widget-shadow), with zero as the only allowed literal.