Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Chrome: Rendering RGBA Colors? Reply To: Chrome: Rendering RGBA Colors?

#204571
Jerba
Participant

Note: I figured out why this occurs. Basically, Chrome apparently doesn’t like it when you provide the semi-colon in the string following the RGBA, For example:

Chrome will have issues rendering this:

this.color = 
    'rgba('
        + getRandomInteger(1, 255) + ', '
        + getRandomInteger(1, 255) + ', '
        + getRandomInteger(1, 255) + ', '
        + getRandomValue(0.1, 1) + ')<strong>;</strong>';

But, not this…

this.color = 
    'rgba('
        + getRandomInteger(1, 255) + ', '
        + getRandomInteger(1, 255) + ', '
        + getRandomInteger(1, 255) + ', '
        + getRandomValue(0.1, 1) + ')';