Skip to content

Release: perception lane (CVD, mark layout, contrast, theme-invariant match) v214-v217#446

Merged
JE-Chen merged 8 commits into
mainfrom
dev
Jun 26, 2026
Merged

Release: perception lane (CVD, mark layout, contrast, theme-invariant match) v214-v217#446
JE-Chen merged 8 commits into
mainfrom
dev

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 26, 2026

Copy link
Copy Markdown
Member

Release — ROUND-15 perception lane (part 1)

Four new headless features, each with a pure / injectable-seam core, full 5-layer wiring, headless tests, and EN/Zh docs. All merged to dev with CI green first try.

Package stays Qt-free; all logic unit-tested without the OS/screen via pure cores and injected seams.

JE-Chen added 8 commits June 26, 2026 07:32
Status UIs lean on colour (green ok / red error), but for the ~8% of men
with a colour-vision deficiency those can be indistinguishable and nothing
could check it. simulate_cvd maps RGB through a dichromat matrix
(protan/deuter/tritan) at a severity; colors_collide reports whether two
colours become confusable under it. Pure stdlib over RGB tuples, no deps.
…-batch

Add cvd_simulate: simulate colour-vision deficiency and flag collisions
…olour

set_of_marks draws each numbered label at a fixed offset, so on dense UIs
the numbers pile up and a dark label on a dark element vanishes.
place_labels does greedy non-overlap placement over a candidate ring,
staying in bounds; label_color picks black/white by better WCAG contrast
(reusing a11y_audit.contrast_ratio). Pure geometry, fully testable.
…-batch

Add marks_layout: non-overlapping Set-of-Marks labels with readable colour
a11y_audit.contrast_ratio grades a known foreground/background pair, but
a button or label on screen is a patch of pixels, not two known colours.
dominant_pair splits sampled pixels at the mean luminance into the
dominant text (minority) and background (majority); grade_contrast grades
a pair against WCAG AA/AAA; region_contrast samples a region (injectable
sampler) and grades it. Grade + split are pure, reuse contrast_ratio.
…-batch

Add contrast_map: grade on-screen text contrast by sampling its colours
match_template correlates raw pixel intensities, so a light-mode template
scores terribly against the same control in dark mode (polarity inverted).
normalize_theme maps an image to a polarity-invariant single channel
(sobel/laplacian gradient magnitude, identical for an image and its
inverse) and match_theme normalizes both sides before locating via
visual_match.match_template. cv2/numpy imported lazily.
…ize-batch

Add theme_normalize: match a light-mode template in dark mode
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 137 complexity · 0 duplication

Metric Results
Complexity 137
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 3469c5a into main Jun 26, 2026
31 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant