1 bit image appears negative in dark mode

Posted on
  • I have a 1 bit image without transparency that appears negative when the watch is in dark mode (BangleJS2).

    Is there any way of over-riding this, or should I just use 4-bit mode? (Which would be a shame as I think the string will become longer, and the image just comprises black and white pixels).

    Grateful for any advice!

    (Reason is building watch face below:)

  • You can fix colors via"g.theme.fg=..." and "g.theme.bg=..." or you can call g.setColor("#fff"); before drawing the image... not sure if there are better options :)

  • Thank you - I'll give that a go!

  • Btw the watchface looks really great I will definitely download this one :D

  • Thank you - and thank you for spotting the error in the JSON file. Hope to change the icons as well later tonight or tomorrow.

  • Yes, the 'issue' is that if you have a 1bpp (or 2) unpaletted image, it's drawn in the current FG and BG colours - it's done so you can easily colour images just by using setColor.

    ... but it does mean that unless you set the colours first, the current theme gets used.

  • Thanks Gordon - makes sense!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

1 bit image appears negative in dark mode

Posted by Avatar for blogmywiki @blogmywiki

Actions