Skip to content

Commit f5b1fbd

Browse files
committed
added support for people with colour contrast loss
1 parent 23fb1b8 commit f5b1fbd

File tree

2 files changed

+3
-0
lines changed
  • desktop-app/src/renderer/components

2 files changed

+3
-0
lines changed

desktop-app/src/renderer/components/Previewer/Device/ColorBlindnessTools/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export const ColorBlindnessTools = ({ webview }: Props) => {
159159
top: -75vmax;
160160
}`,
161161
[SIMULATIONS.FAR]: `body { filter: blur(2px); }`,
162+
[SIMULATIONS.COLOR_CONTRAST_LOSS]: `body { filter: grayscale(0.5) contrast(0.8); }`,
162163
};
163164
const css = impairments[visualImpairment.toLowerCase()];
164165
let js = null;

desktop-app/src/renderer/components/VisionSimulationDropDown/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const SIMULATIONS = {
5454
FAR: 'farsightedness',
5555
GLAUCOME: 'glaucoma',
5656
SOLARIZE: 'solarize',
57+
COLOR_CONTRAST_LOSS: 'color-contrast-loss',
5758
};
5859

5960
export const RED_GREEN = [
@@ -68,6 +69,7 @@ export const VISUAL_IMPAIRMENTS = [
6869
SIMULATIONS.CATARACT,
6970
SIMULATIONS.FAR,
7071
SIMULATIONS.GLAUCOME,
72+
SIMULATIONS.COLOR_CONTRAST_LOSS,
7173
];
7274
export const SUNLIGHT = [SIMULATIONS.SOLARIZE];
7375

0 commit comments

Comments
 (0)