This project has moved. For the latest updates, please go here.

Creating a colour swatch dynamically with a predetermined hex colour

Sep 29, 2016 at 10:09 PM
Hi Dirk,

I had a question concerning the code needed to create a JPEG on the fly, which would represent a colour swatch at 75x75 with a predetermined hex code.

How would I achieve this?

Thanks,
Ben
Coordinator
Sep 29, 2016 at 10:32 PM
You should be able to do that with the following code:
using (MagickImage image = new MagickImage("#FF00FF",75,75))
{
  image.Write(@"c:\pretty.jpg");
}
Or do I misunderstand what you mean witch "colour swatch"?