Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Color => string ?

    I'm designing a web user control
    it has a color property and I want to output in the HTML something like:

    bgcolor=#FFDEAD

    for this in the C# code I write(HtmlTextWriter output)

    output.Write(" bgcolor={0}", BackColor);

    but this doesn't work at all, my output is
    bgcolor=Color [A=255, R=231, G=253, B=100]

    how could I format the color value ?
    I could build myself a number like that #123456 but the the default behavior
    is nice, output a color name when it's a unique color, etc ....
    how could I do that ?

    please....


    Lloyd Dupont Guest

  2. Similar Questions and Discussions

    1. Color PDFs Print as Black & White (grayscale) color inkjets In AcroPro 6 Mac
      I am trying to print color pdf's created from a variety of sources (Quark, InDesign, Word, etc...) to my Canon inkjets (i9100 and i450) from Acrobat...
    2. - Rendering a multi-color logo outline to a single spot color (of different shades)
      I have a question similar to the original poster, but with a twist. I have a logo in an AI file. All outlines. It has multiple colors (stroke and...
    3. PDF::Create String font color
      How do you change the color of the font for a string, in something like: $page->string($font1, 12, 15, 584, "Test String."); I would like...
    4. Converting a color negative .jpg to a color positive image .jpg in Photoshop Elements 2.0
      My scanner will convert color photo negatives to a positive image which I can then adjust using Photoshop Elements. However, it is much faster to...
    5. Problem: All of my blues show up as a teal/blue/gray color on the color picker.
      Problem: All of my blues show up as a teal/blue/gray color on the color picker. Im running the web graphics defaults and have tried uninstalling...
  3. #2

    Default Re: Color => string ?

    checkout the WebColorConverter class.


    "Lloyd Dupont" <lloyd@RemoveIfNotSpamming.galador.net> wrote in message
    news:uNuIMuiXDHA.1580@tk2msftngp13.phx.gbl...
    > I'm designing a web user control
    > it has a color property and I want to output in the HTML something like:
    >
    > bgcolor=#FFDEAD
    >
    > for this in the C# code I write(HtmlTextWriter output)
    >
    > output.Write(" bgcolor={0}", BackColor);
    >
    > but this doesn't work at all, my output is
    > bgcolor=Color [A=255, R=231, G=253, B=100]
    >
    > how could I format the color value ?
    > I could build myself a number like that #123456 but the the default
    behavior
    > is nice, output a color name when it's a unique color, etc ....
    > how could I do that ?
    >
    > please....
    >
    >

    Andrew de la Harpe Guest

  4. #3

    Default Re: Color => string ?

    merveilleux dirais-je meme !

    "Andrew de la Harpe" <andrew_dela@hotmail.com> a écrit dans le message de
    news:%23tn6o9iXDHA.1640@TK2MSFTNGP10.phx.gbl...
    > checkout the WebColorConverter class.
    >
    >
    > "Lloyd Dupont" <lloyd@RemoveIfNotSpamming.galador.net> wrote in message
    > news:uNuIMuiXDHA.1580@tk2msftngp13.phx.gbl...
    > > I'm designing a web user control
    > > it has a color property and I want to output in the HTML something like:
    > >
    > > bgcolor=#FFDEAD
    > >
    > > for this in the C# code I write(HtmlTextWriter output)
    > >
    > > output.Write(" bgcolor={0}", BackColor);
    > >
    > > but this doesn't work at all, my output is
    > > bgcolor=Color [A=255, R=231, G=253, B=100]
    > >
    > > how could I format the color value ?
    > > I could build myself a number like that #123456 but the the default
    > behavior
    > > is nice, output a color name when it's a unique color, etc ....
    > > how could I do that ?
    > >
    > > please....
    > >
    > >
    >
    >

    Lloyd Dupont Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139