MSDN:
COLORREF value has the following hexadecimal form: 0x00bbggrr
To extract the individual values for the red, green, and blue components of a color value, use the GetRValue, GetGValue, and GetBValue macros, respectively.
Qt docs:
typedef QRgb
An ARGB quadruplet on the format #AARRGGBB, equivalent to an unsigned int.
They seem to be in a slightly different format so you can't pass COLORREF as QRgb, but something like this should do the trick:
COLORREF ref = PALETTEINDEX(n);
QColor color
= QColor::fromRgb(GetRValue
(ref
), GetGValue
(ref
), GetBValue
(ref
));
COLORREF ref = PALETTEINDEX(n);
QColor color = QColor::fromRgb(GetRValue(ref), GetGValue(ref), GetBValue(ref));
To copy to clipboard, switch view to plain text mode
Bookmarks