none
Hex color to color string

    Question

  •  

            hello,

                    i have a hexadecimal code which i want to convert to equivalent color string. how can i convert it? please help me.

           for example:

                     i have a hexa code like "#00FFAA77"

                                and i want the equivalent color string.

      or vice versa will also works for me.

    thank you,

    sai.

    Thursday, June 08, 2006 5:25 PM

Answers

All replies

  • I do't know if it's possible.

     

    You can use something like this to get a Color object but that won't do the trick:

     

    string s = "#00FFAA77";

    ColorConverter cc = new ColorConverter();

    Color color = (Color)cc.ConvertFrom(s);

     

     

    Thursday, June 08, 2006 6:00 PM
  • Keep in mind that it'll only have a color string like "Red" or "HotPink" or whatever if it's a system-defined color, unless you're defining "color string" as something else
    Thursday, June 08, 2006 6:56 PM
  • theres an app which might help you

    http://www.thirteen23.com/labs/winfx/fp.hue/

    I am not sure of the equivalent code.

    Thursday, June 08, 2006 8:23 PM
    Moderator
  •  

                 hai   Thomas,

                                     Thank you very much for your help. The code is working fine for my scenario.

    Friday, June 09, 2006 7:26 AM
  •  

      hai,

              thanks for the help

    Friday, June 09, 2006 7:27 AM
  •  SaiSankar wrote:

     

                 hai   Thomas,

                                     Thank you very much for your help. The code is working fine for my scenario.

     

    Great news :)

    Friday, June 09, 2006 7:27 AM
  •  

      hi,

              thanks for the help

    Friday, June 09, 2006 7:28 AM