RGB function Null safety

int RGB(
  1. int r,
  2. int g,
  3. int b
)

Selects a red, green, blue (RGB) color based on the arguments supplied and the color capabilities of the output device.

Implementation

//
// ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
int RGB(int r, int g, int b) => r + (g << 8) + (b << 16);