-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
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
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); }
Asked: 2010-05-15 05:21:17 +0800
Seen: 439 times
Last updated: May 17 '10