RGB Value display on Touchscreen

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by Jesmond, Feb 7, 2017.

  1. Jesmond

    Jesmond

    Joined:
    May 18, 2005
    Messages:
    107
    Likes Received:
    0
    Location:
    Victoria
    Hi Guys,

    I have seen all the other RGB threads regarding LEDs and DMX and did use logic to SetBrush but I can't work out how to get the three colours (the RGB value ie 156,0,0 or 10223616 as an integer to display on one square in the PICED file so I can demonstrate to my customer what the colour would look like if the load was on?

    Can someone please explain how I achieve this.

    Thanks as always
     
    Jesmond, Feb 7, 2017
    #1
  2. Jesmond

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,522
    Likes Received:
    173
    Location:
    Adelaide, Australia
    To convert the 3 colours to an integer you just need:

    colour :=(blue shl 16) + (green shl 8) + red;
     
    Ashley, Feb 7, 2017
    #2
  3. Jesmond

    Jesmond

    Joined:
    May 18, 2005
    Messages:
    107
    Likes Received:
    0
    Location:
    Victoria
    Hi Ashley,

    Sorry for the delay in saying thanks for your advice....

    Thank-you
     
    Jesmond, Mar 8, 2017
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.