ux-theming

Registers VS Code theme colors and styles widgets with focus and high-contrast compliance.

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/basedgod55hjl/vsbrax --skill ux-theming-basedgod55hjl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ux-theming
Source: https://github.com/basedgod55hjl/vsbrax/tree/main/.github/skills/ux-theming
Command: npx skills add https://github.com/basedgod55hjl/vsbrax --skill ux-theming-basedgod55hjl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? VS Code extension and workbench contributors often hardcode colors, shadows, and borders that break in different themes and fail high-contrast accessibility requirements, leading to review rejections and inconsistent UI. ## Core Features & Use Cases - Color Registration: Register theme colors with defaults for light, dark, hcDark, and hcLight using registerColor in colorUtils.ts, with transforms like transparent(), darken(), and lighten(). - CSS Variable Integration: Reference any registered color in stylesheets via --vscode-* custom properties and helper functions like asCssVariable(). - Widget Style Patterns: Apply default widget style objects (defaultButtonStyles, defaultInputBoxStyles, etc.) and override specific colors through factory functions in defaultStyles.ts. - Accessibility Compliance: Implement focus indicators with var(--vscode-focusBorder), focus trapping for modal dialogs, and high-contrast rules including contrastBorder usage and box-shadow removal. - Use Case: When adding a new custom widget to the workbench, use this Skill to register its colors correctly, style it with theme tokens, and pass HC/focus review on the first attempt. ## Quick Start Use the ux-theming skill to register a background color for my new panel widget and write its CSS with proper theme variables and high-contrast support.

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() instead of hardcoding hex values.

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

Registered colors are injected as CSS custom properties on .monaco-workbench, so a color like editor.background becomes var(--vscode-editor-background). Reference these variables directly in your stylesheet instead of hardcoded values.

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

Always provide hcDark and hcLight defaults when registering colors, use contrastBorder for borders since it is only visible in HC themes, and remove box shadows in HC mode. Use .hc-black and .hc-light CSS class selectors for HC-specific overrides.

How do I style a focus indicator for a custom VS Code widget?▼

Use outline with var(--vscode-focusBorder), typically with outline-offset of -1px, and suppress the ring on active state. Never hardcode a focus color, and use the .synthetic-focus class for programmatic focus indication.

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

Hardcoded colors, shadows, and borders break across themes and fail high-contrast accessibility requirements. All visual values must come from registered color tokens or --vscode-* CSS variables, with zero values and structural percentages as the only exceptions.