github miqdadbadjuber/anti-slop v3.2.27
v3.2.27: the contrast MCP no longer passes malformed hex

40 minutes ago

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 #0008 now come back as
    isError, the same check contrast-check.py already made.
  • Valid values are unchanged. #777 still returns 4.48
    and fails normal text, while #FFF and #000 return 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-repo now fails when the hex check exists in only
    one of contrast-check.py and contrast-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.

Don't miss a new anti-slop release

NewReleases is sending notifications on new releases.