So you want convert a .NET color to hex or a hex color to .NET color. Well, its very easy to do this. We won’t have to write lots of code or a special class for it. Thanks to ColorTranslator class. We can convert between these with only 1 line of code. Here’s how its done:
To convert a Hex color to .NET color use this code:
Color color = ColorTranslator.FromHtml("#000000");
For converting a .NET color to Hex color, use thise code:
Color color = Color.FromArgb(0, 100, 50, 100);
// Get the hex color
string HexColor = ColorTranslator.ToHtml(color);
That was simple & easy. If you have any questions don’t hesitate to leave a comment.
Capturist is a simple and handy tool for managing screenshots. Instead of describing its every feature in text, I think it’ll be good to see it in action.
This video shows all the features Capturist offers:
The main features that Captuirst offers are:
Take screenshots of the whole screen, a particular window, or of some area on the screen.
Upload to imageshack with one click!
Save screenshots with high quality in all the popular image formats (Jpeg, Gif, Png etc).
Fast, easy to use and very light (only 500kb)
What are you waiting for? Get your copy of Capturst for only $9.99 now!
Visit: www.capturist.com
A detailed tutorial about creating an Image Viewer or Picture Viewer application in C#. This application also converts Images from one type to another.