Bug 138237

Summary: Color cube incorrect for xterm-256color mode (patch)
Product: [Applications] konsole Reporter: Tom Schumm <phong>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: patch to correct error in color cube calculation

Description Tom Schumm 2006-12-02 06:08:31 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
OS:                Linux

There is a small error in the math used to calculate the 6x6x6 color cube used in 256 color mode resulting in that part of the palette being too dim. It should use the standard 6x6x6 color cube used everywhere (where each of the rgb values is a multiple of 51).

I've attached a simple patch that corrects the error.  It also makes the same correction in tests/color-spaces.pl where it shows the color cube in 3-byte color mode, and changed the grayscale ramp to be consistent with the 256 color grayscale ramp.
Comment 1 Tom Schumm 2006-12-02 06:09:36 UTC
Created attachment 18749 [details]
patch to correct error in color cube calculation
Comment 2 Robert Knight 2006-12-02 14:12:58 UTC
Thank-you for the patch Tom.  I have committed it to the KDE 3.5 branch.

I have also applied it to the KDE4-based branch of Konsole that I am currently working on, it will appear in KDE4 when I merge that branch with the main tree.