Convert long integer color value to RGB

D

Dale Fye

I have some long integer color values that I need to convert to RGB parameters.

I saw a formula for this somewhere, but cannot remember the specifics and
cannont find a referenece on-line.

Dale
 
C

Chirag

Here is a sub routine that you can use:

---
Sub ConvertLongToRGB(ByVal Value As Long, R As Byte, G As Byte, B As Byte)
R = Value Mod 256
G = Int(Value / 256) Mod 256
B = Int(Value / 256 / 256) Mod 256
End Sub
---

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 
D

Dale Fye

Thanks, guys.

I eventually found what I needed in the Powerpoint help. I had looked at
the RGB property, but didn't realize that there was also a function, and the
function example gave me what I needed.

Dale
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top