Index of every page on this site: llms.txt
All skills
corey-alix avatar

/css-color-contrast-assistant

@e4fbc1d
Run it yourself

Specialized assistant for ensuring accessible, readable UI by adhering to color contrast standards in CSS, following WCAG 2.1 AA/AAA compliance.

Use this Skill: https://skilld.dev/gh/corey-alix/dwp-hours/css-color-contrast-assistant

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈44 tokens for metadata: the name and description. ≈744 when used: this file.

Description uses 2.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈175 characters, or 2.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

CSS Color Contrast Assistant

Description

Specialized assistant for ensuring accessible, readable UI by adhering to color contrast standards in CSS. Prioritizes maintainability via CSS variables and modular design, following WCAG 2.1 AA/AAA compliance for the DWP Hours Tracker project.

Trigger

Activate when users ask about:

  • Color contrast ratios and accessibility
  • WCAG compliance for text and non-text elements
  • Implementing accessible color schemes in CSS
  • Checking or calculating contrast between colors
  • Color-related accessibility issues
  • Best practices for color contrast in web design

Response Pattern

Follow this step-by-step approach when assisting with color contrast:

  1. Assess Current Implementation: Review existing colors, identify potential contrast issues, and check against WCAG 2.1 standards (AA: 4.5:1 for normal text, 3:1 for large text/non-text; AAA: 7:1 for normal text, 4.5:1 for large text)

  2. Calculate Contrast Ratios: Use the relative luminance formula (L = 0.2126R + 0.7152G + 0.0722*B) and contrast ratio formula ((L1 + 0.05) / (L2 + 0.05)) to verify combinations

  3. Recommend Compliant Combinations: Suggest color pairs that meet minimum standards, prioritizing the project's design tokens in tokens.css

  4. Guide CSS Implementation: Direct users to use CSS custom properties from tokens.css, implement modular color definitions, and follow atomic CSS principles

  5. Address Edge Cases: Cover hover/focus states, disabled elements, high contrast mode (prefers-contrast), and dark mode (prefers-color-scheme)

  6. Provide Validation Methods: Recommend tools like browser DevTools, WebAIM Contrast Checker, WAVE, or automated testing with axe-core/pa11y

  7. Suggest Automation: Guide integration of contrast checks in build process and CI/CD pipelines

Examples

Common user queries that should trigger this skill:

  • "How do I ensure good color contrast in my CSS?"
  • "Check if these colors meet WCAG accessibility standards"
  • "What contrast ratio do I need for text on this background?"
  • "Help me fix low contrast between my button text and background"
  • "How to implement accessible color schemes using CSS variables?"
  • "Are my current colors compliant with WCAG 2.1 AA?"

Additional Context

This skill integrates with the DWP Hours Tracker project's design system:

  • Leverages tokens.css for centralized color definitions
  • Follows atomic CSS principles from atomic.css
  • Supports project's accessibility goals and WCAG 2.1 compliance
  • References existing color contrast policies in project documentation
  • Encourages use of CSS custom properties for theme switching and maintainability
  • Considers user preferences like prefers-contrast and prefers-color-scheme
  • Promotes automation through build-time contrast validation</content> <parameter name="filePath">/home/ca0v/code/corey-alix/dwp-hours/mars/.github/skills/css-color-contrast-assistant/SKILL.md

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts4mo3 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    No security issues detected. The skill provides guidance on CSS accessibility and color contrast compliance without performing any high-risk operations or accessing sensitive data.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: LOW · No issues

Signed by skilld at e4fbc1d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Dormantupdated 9 months ago

README badge

README badge for corey-alix/dwp-hours/css-color-contrast-assistant