Required Information

Version(s) of Ext GWT
Ext GWT 3.0b and 3.1

Browser versions and OS
doesn't matter

Virtual Machine
doesn't matter

Description
There is a bug in RGB calculation out of an HSL. It seem like, it only appears, if the hue is zero. The resulting RGB is always a shade of grey (r=g=b).

Run mode
Only tested in development mode.

Steps to reproduce the problem
Initilize an RGB with a given HSL with hue = 0.
See example below.

Expected result
RGB in shade of red.

Actual result
RGB in shade of grey.

Test case
Code:
        RGB rgb = new RGB(new HSL(new RGB(255, 0, 0)));
        GWT.log(rgb.getColor());  // rgb(128, 128, 128)   <<<--- WRONG
        rgb = new RGB(new HSL(new RGB(255, 1, 0)));
        GWT.log(rgb.getColor());  // rgb(255, 1, 0)   <<<--- Right
Debugging already done
  • In gxt-chart-3.0.0b.jar com.sencha.gxt.chart.client.draw.RGB line 112:
    if (h == 0 || s == 0) {
    shall be
    if (s == 0) {

    The shortcut to set r, g and b each to l seems only correct, if s==0.

Workaround
Don't use the RGB(HSL hsl) - Constructer. At least not when hue is zero.