You are reading a single comment by @Andreas_Rozek and its replies. Click here to read the full conversation.
  • ...although it may just be a mistake in the documentation - but it took me surprisingly long to find that out.

    From the documentation of E.HSBtoRGB, you might be tempted to write

        let Color = E.HSBtoRGB(i/Steps,1,1, true);
        g.setColor(Color[0],Color[1],Color[2]);
    

    but this is wrong! You have to write

        let Color = E.HSBtoRGB(i/Steps,1,1, true);
        g.setColor(Color[0]/255,Color[1]/255,Col­or[2]/255);
    

    instead in order to get the expected results!

    (Please note: you cannot simply write

        let Color = E.HSBtoRGB(i/Steps,1,1);
        g.setColor(Color);
    

    as the Bangle.js 2 does not support 24-bit color)

    (see GitHub for some examples)


    2 Attachments

    • ColorStripes.png
    • ColorWheel-24Steps.png
About