Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RGB.... getting single Color of this function
#1
Hi again,

i have the following problem: You know, that the function RGB(255,0,100) returns a value (here: 16711780).

Now i have the problem to calculate the single color from this number. How could i make this possible?

- Stormy
Reply
#2
Code:
red = (color SHR 16) AND &hFF
green = (color SHR 8) AND &hFF
blue = color AND &hFF
That's it, assuming color is in the same format returned by RGB.
ngelo Mottola - EC++
Reply
#3
Thanks for your fast help! Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)