\setupcolors[state=start]
\setupcolor[hex]

%% fraction=  1/255*65536= 257.004
%\newdimen\hexcolorfraction \hexcolorfraction=\dimexpr1pt/255\relax% = 257sp

\definecolor[testcolor] [r=0.87843,g=0.87451,b=0.89020] % RGB(224,223,227))
\definecolor[testcolorHEX] [h=E0DFE3]% same as HEX (currently transformed to RGB(223,222,226) )
\definecolor[testcolor] [r=1,g=1,b=1] % RGB(224,223,227))
\definecolor[testcolorHEX] [h=FFFFFF]% same as HEX (currently transformed to RGB(223,222,226) )


\startMPpage
    path p;
    p:= unitsquare xyscaled(5cm,5cm);
    fill (point 0 of p -- point 1 of p -- point 2 of p --cycle)
    withcolor \MPcolor{testcolorHEX}; % bottom right part of the square
    fill (point 0 of p -- point 3 of p -- point 2 of p --cycle)
    withcolor \MPcolor{testcolor}; % top left part
\stopMPpage

