# ZKthemer color problem:

vinhvo
369 3

HI, I am using ZKthemer to change the color of ZKoss. However when I use color likes: FF 45 00(orange red). It turns out to be pink :(. And for any similar red colors, I faced same problem.
Thank you very much for your help.

delete retag edit

## 2 Replies

SimonPai
1696 1

Hi vinhvo,

I think ZKThemer uses the color you input as a base color to generate the color of components image files. As it generates it adds much white color to achieve the effect of a gradient.
You'll probably need to read the source code to figure out it's rules. (and possibly hack it by yourself ;) )

Or try to avoid high RGB values like FF in your base color, as it may be capped so it breaks your RGB ratio (not comfirmed, just my guess).

Regards,
Simon

vinhvo
369 3

    public int filterRGB(int x, int y, int rgb) {
int alpha = (rgb >> 24) & 0xff;
int red = (rgb >> 16) & 0xff;
int green = (rgb >> 8) & 0xff;
int blue = (rgb) & 0xff;
Color.RGBtoHSB(red, green, blue, hsbvals);
float newHue = fgHue;
float newSaturation = hsbvals[1] * fgSaturation;
float newBrightness = hsbvals[2] * (hsbvals[1] * fgBrightness + (1 - hsbvals[1]));
rgb = Color.HSBtoRGB(newHue, newSaturation, newBrightness);
return (rgb & 0x00ffffff) | (alpha << 24);
}

The code is where the problem arises, I believe so. However, I have tried many way , but without success so far. DO you have any recommendation.

[hide preview]