..hey guys, how to convert range 0-16581375 in to R, G, B value?
Integer to RGB
Blitz3D Forums/Blitz3D Programming/Integer to RGB ..okay..I got it..thankss...
euhh
...
np ;P
...
np ;P
When you successfully find the answer to something you have asked for on the forum, it's polite to share to solution.
http://www.blitzbasic.com/codearcs/codearcs.php?code=551
http://www.blitzbasic.com/codearcs/codearcs.php?code=551
..thank you for reminding me Rob..
Function RColor%(c%)
Return c Shr 16 And 255 Shl 0
End Function
Function GColor%(c%)
Return c Shr 8 And 255 Shl 0
End Function
Function BColor%(c%)
Return c Shr 0 And 255 Shl 0
End Function
Function RColor%(c%)
Return c Shr 16 And 255 Shl 0
End Function
Function GColor%(c%)
Return c Shr 8 And 255 Shl 0
End Function
Function BColor%(c%)
Return c Shr 0 And 255 Shl 0
End Function
You don't need Shr 0 or Shl 0.