3-bit color on Bangle.js 2

Posted on
  • While waiting for the watch and preparing one or two small apps, I was thinking what it does mean that the LCD has 8 colors? While designing graphics, what colors can I expect?

  • Black, White, Red, Green, Blue, Cyan, Yellow, Magenta
    https://en.wikipedia.org/wiki/List_of_monochrome_and_RGB_color_formats#3-bit_RGB

    This is what we used to use in the late 1970s when those first computers first came out.
    Try telling that to the kids of today and they wont beleive ya.

  • Wed 2021.10.13

    'This is what we used to use in the late 1970s when those first computers first came out.'
    Try telling that to the kids of today and they wont beleive ya.

    Try believing monochrome lime green phosphor!!

    The first consumer PC 1978 I used pre-dated the Comodore 64 and Timex Sinclair by four years and I built as a kit:

    The Heathkit H89

    https://www.old-computers.com/museum/computer.asp?st=1&c=135
    see H89   https://en.wikipedia.org/wiki/Heathkit_H8

    I paid over $1500 USA dollars which was a third of a years salary (electronics tech) then. With Yes Fragile and Rush Fly By Night albums playing still took six weekends to build, along with parts to wire wrap the additional 16K board (to save the $150 for a new board) so that I had the maximum amount, 64K!!

    It had an amazing single color lime green phosphor 80 char output. Yeah I was top kid on the block back then!! I still have it, fired it up a could of years ago and was amazed at the blazing speed of 6 minutes just to boot off the 100K hard sectored 5 1/4 floppies.

    Incidentally, NASA has offered me ~$1000 just for both the Z80 and 8080 processors inside as they are much needed for repair stock and no longer manufactured.



    I challenge your 1970's claim @HughB as that would have had to have been early / mid 80's ;-)

    Commodore 64 Date introduced: August 1982
    The Timex Sinclair 1000 was introduced in July 1982
    The first Macintosh was introduced on January 24, 1984



    . . . and I thought I was dating myself!

  • So yes, 3 bit = 8 colors

    However there's dithering built in, so if you don't require solid color it's actually pretty flexible. try the emulator:

    https://www.espruino.com/ide/?emulator&upload&gist=203fe0c3768b5df1b09b0769bf7d2c4c


    1 Attachment

    • dither.png
  • @Robin - you did have it bad.
    Never mind, I remember cross compiling for a 6801 board on an IBM 370, and a v52 terminal.

  • ZX Spectrum colours!


    1 Attachment

    • Zx-colors.png
  • I forgot Sinclair ZX80 was monochrome.
    I bitterly could never afford such a machine, and feel loss that I never had the chance of a mispent youth. Kudos to any brave kid who saved up spent the money and soldered their machine. The first real computer I owned was a 1990 Dell 286, could at a pinch run Windows 3.

    https://en.wikipedia.org/wiki/ZX80?wprov=sfla1

  • Thanks everybody for this thread.

    I was wondering why the Bangle 2 display looked funky, with less vivid colors than the original Bangle.
    Somehow I missed the fact that the always-on Bangle 2 display has just 3 bit color versus 16 bit.
    Hmm - Now I also see Bangle 2 is 176x176 vs. 240x240 on the original Bangle.

    Anyhow - I've been totally blown away with how good the battery life is. No doubt the 3-bit display and lower resolution helps battery life quite a bit.
    Sitting idle for about a week, my Bangle 2 has lost maybe 30% of charge - if that.
    Remarkable!
    Well worth the trade-off on the display...

  • @Gordon

    This code is quite magic - trying to figure it out.

    // HSB test
    for (var y=0;y<176;y+=4)
      for (var x=0;x<176;x+=4)
        g.setColor.apply(g,E.HSBtoRGB(x/176.0,y/176.0,1,1).map(x=>x/256)).fillRect(x,y,x+3,y+3);
    

    If I wanted a whole screen of a mix blue and cyan - how could I do that ?

  • If I wanted a whole screen of a mix blue and cyan - how could I do that ?

    The first argument of HSBtoRGB is hue - so you'd just change x/176.0 so instead of 0..1 it went 0..0.2 or whatever have you the colours you want

  • I would like to have saturated colors on my Bangle2, without dithering. According to List of monochrome and RGB color formats: 3 bits, there should be eight possibilities:

    (255,0,0) => 100 (pure red, no dithering)
    (0,255,0) => 010 (pure green, no dithering)
    ... and other RGB combinations with components different of 0 and 255, being dithered.

  • Yes, that's correct - these correspond to #f00,#0f0, etc

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

3-bit color on Bangle.js 2

Posted by Avatar for avanc @avanc

Actions