mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-07-04 23:03:29 +00:00
Fix blue channel ignored in fg_override contrast check
diff.g was used twice instead of diff.g + diff.b, causing the same-color detection to miss blue-only differences. This meant the HSLuv contrast override could skip adjustment for color pairs differing primarily in blue. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aceaef8a1d
commit
dc2bebd89e
1 changed files with 1 additions and 1 deletions
|
|
@ -284,7 +284,7 @@ vec3 fg_override(float under_luminance, float over_luminance, vec3 under, vec3 o
|
|||
float result_a_ratio = contrast_ratio(under_luminance, dot(result_a, Y));
|
||||
float result_b_ratio = contrast_ratio(under_luminance, dot(result_b, Y));
|
||||
vec3 result = mix(result_a, result_b, step(result_a_ratio, result_b_ratio));
|
||||
return mix(result, over, max(step(diff.r + diff.g + diff.g, 0.001f), step(min_contrast_ratio, ratio)));
|
||||
return mix(result, over, max(step(diff.r + diff.g + diff.b, 0.001f), step(min_contrast_ratio, ratio)));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue