VB Code:
'split into colors
Sub SplitColors(lcolor As Long, red As Byte, green As Byte, blue As Byte)
red = lcolor And &HFF
green = Int(lcolor \ &H100) And &HFF
blue = Int(lcolor \ &H10000) And &HFF
End Sub
'returns true if color is in range of yellow
Function PureYellow(lcolor As Long) As Boolean
Dim red As Byte
Dim green As Byte
Dim blue As Byte
PureYellow = False
Call SplitColors(red, green, blue)
If red > &HD0 Then Exit Function
If green < &HF0 Or blue < &HF0 Then Exit Function
PureYellow = True
End Function
Can you see how this is being done?