A malformed hex now returns an error instead of a false pass.
The MCP tool read any hex string by slicing it into three
pairs, so #00000080 became opaque black and reported 21:1
against white. At 50% opacity over white it is about
#808080, which measures 3.95:1 and fails normal text. An
agent could paste an alpha value and get a pass on a pairing
that fails.
What changed
- Only 3 or 6 hex digits are accepted.
#00000080,
#12345,#1234567, and#0008now come back as
isError, the same checkcontrast-check.pyalready made. - Valid values are unchanged.
#777still returns 4.48
and fails normal text, while#FFFand#000return the
same ratios as before. - Alpha is rejected, not composited. Compositing it over
the background would be a separate change, and the CLI
makes the same choice.
Also in this release
- The two contrast scripts can no longer drift.
check-reponow fails when the hex check exists in only
one ofcontrast-check.pyandcontrast-mcp.py, using
the parity check already applied to the WCAG constants.
Updating is unchanged
npx antislop-ai --update
A plugin keeps its own copy, so update it from its marketplace.
The guide has the command for each door.
Thanks to @fajarhide for #59 and #60.