Question

I read in an old qooxdoo note that "qx.util.ColorUtil now accepts rgba values for cssStringToRgb()". This means to me that qoxdoo has the ability to deal with rgba colors in some ways.

But none of the ways I tried to set colors in a theme extending qx.theme.modern.Color has been parsed by qoxxdoo : throw new Error("Could not parse color: " + temp); Is it a bug (may I open a ticket?) or is my way of setting color variables bad ?

Thanks for your replies.

Was it helpful?

Solution

qooxdoo's theming system doesn't support rgba since (at least AFAIK) there's no way to implement it for older browsers such as Opera 9.x. You're getting that error because rgba strings aren't considered valid color definitions.

qx.util.ColorUtil.cssStringToRgb only deals with rgba strings in that it returns the color values, stripping the alpha channel value.

OTHER TIPS

It is actually possible. Instead of assigning a string with the hex representation of the color, you can assign an array of rgb(a) values:

[255, 0, 0, .5]

which is an equivalent of

rgba(255, 0, 0, .5)

and appears as half-transparent red.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top