File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
Previewer/Device/ColorBlindnessTools Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,45 @@ export const defaultDevices: Device[] = [
298298 isTouchCapable : true ,
299299 isMobileCapable : true ,
300300 } ,
301+ {
302+ id : '10022' ,
303+ name : 'iPhone 16' ,
304+ width : 393 ,
305+ height : 852 ,
306+ dpr : 3 ,
307+ capabilities : [ 'touch' , 'mobile' ] ,
308+ userAgent :
309+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1' ,
310+ type : 'phone' ,
311+ isTouchCapable : true ,
312+ isMobileCapable : true ,
313+ } ,
314+ {
315+ id : '10023' ,
316+ name : 'iPhone 16 Plus' ,
317+ width : 430 ,
318+ height : 932 ,
319+ dpr : 3 ,
320+ capabilities : [ 'touch' , 'mobile' ] ,
321+ userAgent :
322+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1' ,
323+ type : 'phone' ,
324+ isTouchCapable : true ,
325+ isMobileCapable : true ,
326+ } ,
327+ {
328+ id : '10024' ,
329+ name : 'iPhone 16 Pro' ,
330+ width : 393 ,
331+ height : 852 ,
332+ dpr : 3 ,
333+ capabilities : [ 'touch' , 'mobile' ] ,
334+ userAgent :
335+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1' ,
336+ type : 'phone' ,
337+ isTouchCapable : true ,
338+ isMobileCapable : true ,
339+ } ,
301340 {
302341 id : '20001' ,
303342 name : 'Nexus 4' ,
Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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
5960export 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] ;
7274export const SUNLIGHT = [ SIMULATIONS . SOLARIZE ] ;
7375
You can’t perform that action at this time.
0 commit comments