Gray Background on Epix Data Field

I'm getting a light gray background and a medium gray font on a data field on an Epix when I expect to get White background and black text. It works fine on the simulator. It works fine on other 64 color devices. It works fine when I set it to have a black background (I get black background and white text)

Here's a pic of the flaw. The top data field is the problem one.



Here's the code that sets the colors.

function onUpdate(dc) {

var color = self.getBackgroundColor();
dc.setColor(color, color);
dc.clear();
Sys.println("color" + color);
Sys.println("black: " + Gfx.COLOR_BLACK);
Sys.println("white: " + Gfx.COLOR_WHITE);

dc.setColor(~color & 0xFFFFFF, Gfx.COLOR_TRANSPARENT);


The printlns produce the following on the simulator.

color16777215
black: 0
white: 16777215


But they produce the following on the device.

color12632256
black: 0
white: 16777215


So it seems that getBackgroundColor() returns gray instead of white when the background is set to white on the Epix device. I'm assuming this is a bug???
  • Roger,

    This issue was noticed by others on the edge_520, but I wasn't aware that any other devices were affected. It can be worked around by using a conditional..

    var color = getBackgroundColor() ? Gfx.COLOR_BLACK : Gfx.COLOR_WHITE;
    dc.setColor(color, color);
    dc.clear();

    // cheap hack to work around epix background color issue
    dc.setColor(~color & 0xFFFFFF, Gfx.COLOR_TRANSPARENT);


    Travis
  • Roger,

    I reported the background color issue a while ago relating to the Epix but didn't hear anything back. This is the route I went with this since I was only allowing a choice between white/black for background color. Hope that helps.


    // determine background color and clear screen
    var bgColor = (getBackgroundColor() == Gfx.COLOR_BLACK) ? Gfx.COLOR_BLACK : Gfx.COLOR_WHITE;
    var fgColor = (bgColor == Gfx.COLOR_BLACK) ? Gfx.COLOR_WHITE : Gfx.COLOR_BLACK;
    dc.setColor(Gfx.COLOR_TRANSPARENT, bgColor);
    dc.clear();
  • There was an issue like this on Edge, like Travis mentioned, but it was thought to only affect 16-bit color devices. I'll get this reported to get the fix added to Epix.

    lcj2: Sorry if we let your earlier report slip through the cracks!