How to get RGB value of colour?

Posted on
  • I need an array that gives me [R, G, B] from g.theme.fg2. I couldn't find any function that does this in the API Reference.
    Any thoughts on how to do this?

  • No, I'm afraid there is nothing built-in for this. The colour is RGB565 so you can decode it like this though:

    r = (col>>11)&0x1F;
    g = (col>>5)&0x3F;
    b = col&0x1F;
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to get RGB value of colour?

Posted by Avatar for Asynchronous @Asynchronous

Actions