How to? Use this simple tool, HTML color. I've searched who make this tools, but I only find that his/her site is removed. This is freeware, free to use but for non commercial use, you can't sell it.
Just hover your mouse on your desired color, and you'll get HTML code of picked color.
Download HTML color here