On Monday, 14 December 2020 at 05:24:39 UTC, Виталий Фадеев wrote:
... msg ...
But...:
Color rgb( uint color )
{
return
Color( cast( uint ) (
( ( color & 0x000000FF ) << 16 ) |
( ( color & 0x0000FF00 ) ) |
( ( color & 0x00FF0000 ) >> 16 )
) );
}
unittest
{
auto color2 = 0x00AABBCC.rgb;
}
".rgb" Compiled fine.
".argb" Compilation error.
Source:
https://run.dlang.io/is/ULQ4kh
