How do I draw a filled circle onto a graphics object in a hexadecimal colour? (C#)
- by George Powell
I need to draw a circle onto a bitmap in a specific colour given in Hex. The "Brushes" class only gives specific colours with names.
Bitmap bitmap = new Bitmap(20, 20);
Graphics g = Graphics.FromImage(bitmap);
g.FillEllipse(Brushes.AliceBlue, 0, 0, 19, 19); //The input parameter is not a Hex
//g.FillEllipse(new Brush("#ff00ffff"), 0, 0, 19, 19);…