Table of Contents

Enum ColorVisionDeficiency

Namespace
Egami.Operations
Assembly
Egami.dll

A color vision deficiency to simulate.

public enum ColorVisionDeficiency

Fields

Achromatopsia = 3

No color vision: only luminance is seen; a severity below 1 mixes toward it.

Deuteranopia = 1

Missing or shifted medium-wavelength (green) cones, the most common kind; a severity below 1 is deuteranomaly.

Protanopia = 0

Missing or shifted long-wavelength (red) cones; a severity below 1 is protanomaly.

Tritanopia = 2

Missing or shifted short-wavelength (blue) cones; a severity below 1 is tritanomaly.

Examples

// A two-color poster, then a check of how it reads to someone with deuteranopia.
raster.Apply(o => o.Duotone(Rgba8.FromHex("#1b2a49"), Rgba8.FromHex("#f2c14e")).Posterize(4, DitherMode.Ordered), Ct);
using Raster<Rgba8> preview = raster.Derive(o => o.SimulateColorBlindness(ColorVisionDeficiency.Deuteranopia), Ct);

// High contrast for low vision: gray, lightness inverted so dark becomes light, and more contrast.
using Raster<Rgba8> readable = raster.Derive(o => o.HighContrast(grayscale: true, ContrastInvert.Lightness, contrast: 0.3f), Ct);