Answers for "color to hex"

0

possible colors used for html

#FFEFD5 (PAPAYAWHIP)   and

#556B2F (DARKOLIVEGREEN)

...are not web safe colors. They would get shifted to

#FFFFCC (NOT PAPAYAWHIP)   and

#666633 (NOT DARKOLIVEGREEN)
Posted by: Guest on May-21-2020
0

hex to colorrref

COLORREF crefColor = RGB(128,0,128);

DWORD dwR = GetRValue(crefColor);
DWORD dwG = GetGValue(crefColor);
DWORD dwB = GetBValue(crefColor);

CString sValue;
sValue.Format(_T("#%02X%02X%02X"), dwR, dwG, dwB);
ASSERT(sValue == _T("#800000")); // correct
Posted by: Guest on December-15-2021

Browse Popular Code Answers by Language