[Bug] E.HSBtoRGB

Posted on
  • ...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);

    but this is wrong! You have to write

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

    instead in order to get the expected results!

    (Please note: you cannot simply write

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

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

    (see GitHub for some examples)

    2 Attachments

    • ColorStripes.png
    • ColorWheel-24Steps.png
  • Thanks - yes, it's a bit frustrating. I was considering adding the option to output as 16 bit, or maybe just building it into the Graphics instance.

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

[Bug] E.HSBtoRGB

Posted by Avatar for Andreas_Rozek @Andreas_Rozek