[Konsole-devel] [Bug 169013] xterm256 color palette not compatible with standard xterm

pan shi zhu pan.shizhu at gmail.com
Wed Aug 13 03:28:32 UTC 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=169013         




------- Additional Comments From pan.shizhu gmail com  2008-08-13 05:28 -------
my patch for KDE 4.1.0:
diff -c CharacterColor.h.orig CharacterColor.h
*** CharacterColor.h.orig       2008-08-13 11:25:19.000000000 +0800
--- CharacterColor.h    2008-08-13 11:26:24.000000000 +0800
***************
*** 244,253 ****
    if (u <   8) return base[u+2+BASE_COLORS].color; u -= 8;

    //  16..231: 6x6x6 rgb color cube
!   if (u < 216) return QColor(255*((u/36)%6)/5,
!                              255*((u/ 6)%6)/5,
!                              255*((u/ 1)%6)/5); u -= 216;
!
    // 232..255: gray, leaving out black and white
    int gray = u*10+8; return QColor(gray,gray,gray);
  }
--- 244,253 ----
    if (u <   8) return base[u+2+BASE_COLORS].color; u -= 8;

    //  16..231: 6x6x6 rgb color cube
!   if (u < 216) return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0,
!                              ((u/ 6)%6) ? (40*((u/ 6)%6)+55) : 0,
!                              ((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0); u -= 216;
!
    // 232..255: gray, leaving out black and white
    int gray = u*10+8; return QColor(gray,gray,gray);
  }



More information about the konsole-devel mailing list