use-of-color

Analyzes code for WCAG 1.4.1 violations where color alone conveys information.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/po4yka/blog --skill use-of-color-po4yka
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-of-color
Source: https://github.com/po4yka/blog/tree/main/.agents/skills/accesslint-use-of-color
Command: npx skills add https://github.com/po4yka/blog --skill use-of-color-po4yka

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Interfaces often rely on color alone to signal errors, required fields, link states, or chart categories, which makes that information inaccessible to colorblind and low-vision users. This Skill scans your UI code and flags every place where color is the only indicator, then shows you how to fix it. ## Core Features & Use Cases - Violation Detection: Finds links without underlines, form errors shown only with red borders, required fields marked only by colored asterisks, and status indicators lacking icons or text. - Data Visualization Audits: Identifies charts and graphs that differentiate data series only by color without patterns, dashes, or legends. - Actionable Fixes: Each finding includes the file and line, the offending code snippet, and a compliant rewrite using icons, text, ARIA attributes, or additional visual cues. - Use Case: Before shipping a new checkout form, run the analysis on your form components to catch color-only error states and add proper aria-invalid attributes and error messages. ## Quick Start Analyze the files in src/components for WCAG 1.4.1 use-of-color violations and report each issue with a recommended fix.

Frequently Asked Questions about use-of-color

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

FAQPage Schema
How do I check my code for WCAG 1.4.1 Use of Color violations?

Provide the file paths of your UI components and the analysis scans for color-only indicators such as links without underlines, error states shown only with red borders, and charts lacking patterns or labels. Each violation is reported with its location and a compliant code fix.

What are common examples of color-only accessibility violations?

Common violations include links distinguished only by color, form errors indicated solely by a red border, required fields marked only with a colored asterisk, and status messages relying on green or red backgrounds without icons or text.

How do I fix form validation that only uses red borders?

Add an error message with an icon, set aria-invalid on the input, and connect the message with aria-describedby. Color can remain as a supplementary cue, but it must not be the only indicator of the error state.

Does the analysis cover charts and data visualizations?

Yes, it flags charts that differentiate data series only by color. The recommended fix adds stroke dash patterns, direct labels, or a legend so colorblind users can distinguish the data.

When is using color alone acceptable in a UI?

Color-only usage is acceptable when it is purely decorative and conveys no information, when paired with text or icons, or in contexts like syntax highlighting where no critical meaning depends on the color distinction.