COLORREF is, as people have said, a typedef of a 32-bit unsigned integer.
So instead of comparing strings, as your example, you can compare values like this:
if (Color1 == 0x414141 && Color2 == 0x3a3a3a
&& Color3 == 0xd2d2d2 && Color4 == 0
&& Color5 == 0 )
This compares Colour1, Color2 and Color3 to three different grey shades (any colour where the three values - Red, Green, Blue - are the same give a greyscale result).