mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
- Create 53 per-tool VitePress documentation pages with accurate parameters from Zod schemas, example requests, and response formats - Add root llms.txt for LLM-friendly repo browsing - Fix OpenAPI spec: add auth and 422 error schemas to edit-metadata/inspect and strip-metadata/inspect sub-routes - Fix tool count inconsistency (52 -> 53) across landing site, e2e tests, and local docs - Rename color-adjustments.ts to adjust-colors.ts to match tool ID - Update VitePress sidebar with all 8 tool categories and top nav
2.2 KiB
2.2 KiB
description
| description |
|---|
| Simulate how images appear to people with different types of color vision deficiency. |
Color Blindness Simulation
Simulate color vision deficiency (CVD) to preview how images appear to people with various types of color blindness. Useful for accessibility testing of designs, charts, and UI.
API Endpoint
POST /api/v1/tools/color-blindness
Accepts multipart form data with an image file and a JSON settings field.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| simulationType | string | No | "deuteranomaly" |
Type of color vision deficiency to simulate |
Simulation Types
| Value | Condition | Description |
|---|---|---|
protanopia |
Red-blind | Complete absence of red cone cells |
deuteranopia |
Green-blind | Complete absence of green cone cells |
tritanopia |
Blue-blind | Complete absence of blue cone cells |
protanomaly |
Red-weak | Reduced red cone sensitivity |
deuteranomaly |
Green-weak | Reduced green cone sensitivity (most common) |
tritanomaly |
Blue-weak | Reduced blue cone sensitivity |
achromatopsia |
Total color blind | Complete absence of color vision |
blueConeMonochromacy |
Blue-cone only | Only blue cones functional |
Example Request
curl -X POST http://localhost:1349/api/v1/tools/color-blindness \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@design.png" \
-F 'settings={"simulationType": "deuteranopia"}'
Example Response
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/design.png",
"originalSize": 1850000,
"processedSize": 1820000
}
Notes
- Deuteranomaly (green-weak) is the default because it is the most common form of color vision deficiency, affecting approximately 6% of males.
- The simulation uses color transformation matrices that model how reduced or absent cone photoreceptors alter perceived colors.
- This tool is non-destructive and produces a preview only. It does not modify the original image for accessibility.
- Output format matches the input format. HEIC, RAW, PSD, and SVG inputs are automatically decoded before processing.