g.fillPoly dithered colors

Posted on
  • The g.fillPoly function is great, but I'm wondering if there's a way to fill it with dithered colors. For example, let's say I want my polygon to be filled with a black/blue checkerboard pattern. I tried setting the color to (0,0,127) like so:


    but it still filled my polygon with full 0000FF blue.
    It appears that even (0,0,1) will show the same 0000FF color that would be expected from (0,0,255)

    I enjoy the challenge of designing in 3-bit color, just trying to learn the best practices for this sort of situation.

  • What device are you using this on? On Bangle.js 2 you should get dithering, but other devices don't implement it.

    I think the issue is you're using g.setColor(0,0,127); when g.setColor(0,0,0.5); is what you meant to do?

  • Perfect! Yes that does it!
    Thank you for all your awesome support, I've had the bangle 3 days now, and really having a great time playing with it and learning to develop. I have a couple cool apps in the works.

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

g.fillPoly dithered colors

Posted by Avatar for NoMusicTuesdays @NoMusicTuesdays