Before you start

What you need

  • VS Code 1.74 or newer.
  • A project with CSS, SCSS, Less or markup to check.
  • No account. The color and accessibility checks run on your machine.

Setup

Pick what to install

The Auric extensions for color and accessibility
ExtensionWhat it doesIdentifierVersion
Auric ColorContrast diagnostics and quick fixes in stylesheets, color hovers and a color picker.auric-artisan.auric-color0.1.0
Auric AccessibilityWCAG checks in markup and CSS, a project scan and an issues view.auric-artisan.auric-a11y0.1.0
Auric Code HealthLikely secrets, risky code, TODO markers and oversized files.auric-artisan.auric-codehealth0.1.0
Auric Artisan StudioInstalls all three at once.auric-artisan.auric-artisan0.1.0

Setup

Step by step

  1. Install Auric Color

    In VS Code, open Extensions with Ctrl + Shift + X, search for Auric Color and choose Install. From a terminal, the command below does the same.

    Terminal

    code --install-extension auric-artisan.auric-color
  2. Set your contrast target

    The default is 4.5:1, WCAG AA for body text, reported as a warning. Use 7 for AAA, or 3 where only large text and interface parts are checked. Add the settings to your user or workspace settings.json.

    settings.json

    {
      "auricColor.contrast.threshold": 4.5,
      "auricColor.contrast.severity": "warning",
      "auricColor.contrast.standard": "wcag2"
    }
  3. Open a stylesheet

    Open any CSS file in the project. A pair that misses the target is underlined, and the same message appears in the Problems panel.

    You should see: A wavy underline under the failing color, with the ratio, the target and the WCAG criterion in its message.

  4. Add Auric Accessibility for markup

    Install it the same way, then run Scan Project for Accessibility from the Command Palette. It targets WCAG 2.2 unless you change the profile.

    Terminal

    code --install-extension auric-artisan.auric-a11y

    You should see: The Project Issues view, listing each finding with its success criterion and level.

A first task

Fix a real low-contrast diagnostic

This stylesheet, opened with the default settings, produces exactly the diagnostic and quick fix below. They come from running the published Auric Color 0.1.0 on it.

styles.css · The stylesheet

.note {
  color: #8a8a8a;
  background: #ffffff;
}

In the Problems panel

warningLow contrast 3.45:1 — #8A8A8A on #FFFFFF (need 4.5:1, APCA Lc 62). [WCAG 1.4.3]styles.css [Ln 2, Col 10]

The quick fix

Fix contrast → #767676 (4.54:1)

styles.css · After the fix

.note {
  color: #767676;
  background: #ffffff;
}
  1. Put the cursor on the underlined color and press Ctrl + ., or click the light bulb.
  2. Choose the quick fix. It replaces the text color with the nearest one that reaches the target and keeps the background.
  3. To fix every pair in the file at once, run Fix All Contrast Issues in File from the Command Palette; it shows each change before applying them as one undoable edit.

Keyboard shortcuts

Default keys of Auric Color and Auric Accessibility
ActionWindows · LinuxmacOS
Open the command centerCtrl + Alt + .Cmd + Alt + .
Pick or edit the color under the cursorCtrl + Alt + CCmd + Alt + C
Inspect the accessibility of an elementCtrl + Alt + ACmd + Alt + A

Limits

What it does not do

  • It checks the pairs it can read from the source: a color and a background in the same rule, inline styles, CSS-in-JS and the var() tokens it can resolve. Colors set by script at runtime are not checked.
  • When a rule has no background of its own, it assumes the page background, says Possible low contrast and asks you to verify the real one.
  • The quick fix moves the text color, keeping its hue. Check a brand color before you accept the change.
  • The Auric extensions are on the Visual Studio Marketplace, not on Open VSX.

Privacy and access

What stays on your machine

  • Contrast and WCAG checks run locally, with no account.
  • Auric Accessibility keeps its scan cache in a .auric-artisan folder in the workspace. Add it to .gitignore, or turn the folder off with auricA11y.data.enabled.

Go further

The full reference

Checked against

Where these facts come from

Versions, requirements and examples on this page were checked on . Versions and requirements were read from the VS Code Marketplace; settings, commands and keys from the published 0.1.0 packages; the diagnostic from running Auric Color 0.1.0’s own scanner and color code on the stylesheet.

Found a mistake? Write to us and we will correct it.