OpenSpec changes › add-contrast-check · version 1 · 2026-09-25 04:03 UTC
name
add-contrast-check
description
Warn when a stylesheet's text would be hard to read
spec
style-topics
status
in-progress
date
2026-09-24
tags
ai, spec, openspec, change

Proposal

Why

An AI asked for "magenta text on dark green" will do exactly that, readable or not. The save reply should say when text and background are too close, so the AI can adjust before the user squints.

What Changes

Impact

Tasks

1. Build

Design

Spec delta

ADDED Requirements

Requirement: Readable text

The system SHALL warn, without refusing the stylesheet, when a Style topic's text colours have a contrast ratio below 4.5:1 against its backgrounds.

Scenario: Low contrast

Scenario: Good contrast