TColor to System.Drawing.Color

I am looking for information on how to send a Delphi TColor to a .NET visual plugin so it can change a color property of type System.Drawing.Color



TColor is just a 4-byte number that contains color info as 0x00BBGGRR :

Extract color bytes using code like

red := Byte(color);
green := Byte(color shr 8);
blue := Byte(color shr 16);

System.Drwing.Color in its turn provides method which expects incoming value as 0xAARRGGBB.

So take your color component values and compose a number like

(red shl 16) or (green shl 8) or blue

then pass this number from delphi to .NET and use it there to create a Color instance.