Просмотр исходного кода

roi: tweak color scale

this should be more colorblind-friendly
raylu 19 часов назад
Родитель
Сommit
6d7615afcd
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      ts/roi.ts

+ 1 - 1
ts/roi.ts

@@ -49,7 +49,7 @@ async function render() {
 function color(n: number, low: number, high: number): string {
 function color(n: number, low: number, high: number): string {
 	// scale n from low..high to 0..1 clamped
 	// scale n from low..high to 0..1 clamped
 	const scale = Math.min(Math.max((n - low) / (high - low), 0), 1);
 	const scale = Math.min(Math.max((n - low) / (high - low), 0), 1);
-	return `color-mix(in oklch, #0c8 ${scale * 100}%, #f70)`;
+	return `color-mix(in xyz, #0aa ${scale * 100}%, #f80)`;
 }
 }
 
 
 setupPopover();
 setupPopover();