Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Convert Color Index to RGB
- 'Example: =getRGB(48,"R")
- Function getRGB(C_Index As Long, LetterTYPE As String) As Integer
- Dim R As Integer, G As Integer, B As Integer
- R = C_Index Mod 256
- G = C_Index \ 256 Mod 256
- B = C_Index \ 65536 Mod 256
- If UCase(LetterTYPE) = "R" Then
- getRGB = R
- ElseIf UCase(LetterTYPE) = "G" Then
- getRGB = G
- ElseIf UCase(LetterTYPE) = "B" Then
- getRGB = B
- End If
- End Function
Add Comment
Please, Sign In to add comment