mazipan / mazipan/html-tools

feat: add Color Blindness Simulator tool

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
HTML
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Summary

Add a color-blindness.html tool that simulates how an image appears to people with different types of color vision deficiency — entirely in the browser using SVG feColorMatrix filters on canvas.

Motivation

Designers regularly need to check their work against color blindness but rarely have a quick browser-native way to do it — most reach for browser extensions or desktop software. This tool makes the check frictionless, requires zero external dependencies, and has both search volume ("color blindness test image", "color blind simulator") and strong shareability among accessibility-conscious design and front-end teams.

Proposed UX

  • Drop zone: accepts any PNG / JPEG / WebP image
  • 6 simulation views displayed as a responsive grid:
    1. Original
    2. Protanopia (red-blind, ~1% of men)
    3. Deuteranopia (green-blind, ~1% of men)
    4. Tritanopia (blue-blind, rare)
    5. Protanomaly (red-weak)
    6. Achromatopsia (no color — full grayscale)
  • Each view has a label and a brief one-line description of what it simulates
  • Before/after diff slider (reusing the .diff-slider component from the design system) between Original and any selected simulation type
  • Download individual simulated image as PNG
  • "What should I check?" collapsed tip section: contrast ratios, avoid red/green only indicators, etc.

Implementation notes

  • Category: Image (near image-converter, image-compressor)
  • Slug: color-blindness
  • Icon: 👁️
  • No npm dependencies — each simulation uses a well-known feColorMatrix color matrix (Brettel / Viénot / Machado models, simplified to 3×3 matrix approximations suitable for feColorMatrix type="matrix") applied via an offscreen <canvas> + ctx.filter or manual pixel manipulation via getImageData
  • All logic inline in <script>
  • Follow src/_tool-template.html and run bun run generate:sections, bun run generate:index, bun run generate:favicon after adding to tools.json

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/_tool-template.html and inspect the nearby image tools, then add the color-blindness tool entry to tools.json. Implement the six browser-based simulation views, diff slider, download controls, and accessibility tips using inline logic, then run bun run generate:sections, bun run generate:index, and bun run generate:favicon. Done means the generated tool is discoverable and each requested simulation works without external dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
accessibility, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.