0

ZKthemer color problem:

asked 2010-05-15 05:21:17 +0800

vinhvo gravatar image 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 flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2010-05-16 23:47:10 +0800

SimonPai gravatar image 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

link publish delete flag offensive edit

answered 2010-05-17 16:24:45 +0800

vinhvo gravatar image 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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-05-15 05:21:17 +0800

Seen: 439 times

Last updated: May 17 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More