It doesn't work because you're mixing functions from two different frameworks. ToCOLORREF is a GDI+ function, while this particular Color object is from .Net's System.Drawing. The two are roughly analogous, but nevertheless not interoperable. This is what you're working with so the ToArgb method would seem to be the equivalent.