Skip to content

Commit

Permalink
disable kitty background color workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
neurocyte committed Feb 16, 2024
1 parent c7a937c commit 52b7ba4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/lib/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,15 +713,15 @@ term_bg_rgb8(const tinfo* ti, fbuf* f, unsigned r, unsigned g, unsigned b){
// we're also in that case working with hopefully more robust terminals.
// If it doesn't work, eh, it doesn't work. Fuck the world; save yourself.
if(ti->caps.rgb){
if((ti->bg_collides_default & 0xff000000) == 0x01000000){
if((r == ncchannel_r(ti->bg_collides_default)) &&
(g == ncchannel_g(ti->bg_collides_default)) &&
(b == ncchannel_b(ti->bg_collides_default))){
// the human eye has fewer blue cones than red or green. toggle
// the last bit in the blue component to avoid a collision.
b ^= 0x00000001;
}
}
//if((ti->bg_collides_default & 0xff000000) == 0x01000000){
// if((r == ncchannel_r(ti->bg_collides_default)) &&
// (g == ncchannel_g(ti->bg_collides_default)) &&
// (b == ncchannel_b(ti->bg_collides_default))){
// // the human eye has fewer blue cones than red or green. toggle
// // the last bit in the blue component to avoid a collision.
// b ^= 0x00000001;
// }
//}
return term_esc_rgb(f, false, r, g, b);
}else{
const char* setab = get_escape(ti, ESCAPE_SETAB);
Expand Down

0 comments on commit 52b7ba4

Please sign in to comment.