What is the equivalent Hex ?

Discussion in 'HTML' started by Reshma, Nov 1, 2007.

  1. Reshma

    Reshma Guest

    Hello:

    I am new to HTML and CSS. I came across this block of code, .link{
    color:#269;
    display:block;
    margin:4px 0 0 0;
    padding:2px 1em;
    }

    I am wondering what is the equivalent hex code for the color:#269 in
    the above.

    Thanks
     
    Reshma, Nov 1, 2007
    #1
    1. Advertising

  2. Reshma wrote:
    > Hello:
    >
    > I am new to HTML and CSS. I came across this block of code, .link{
    > color:#269;
    > display:block;
    > margin:4px 0 0 0;
    > padding:2px 1em;
    > }
    >
    > I am wondering what is the equivalent hex code for the color:#269 in
    > the above.


    A three-digit RGB code #xyz is shorthand for a six-digit hex code
    #xxyyzz. So, #226699.
     
    Harlan Messinger, Nov 1, 2007
    #2
    1. Advertising

  3. Reshma

    Animesh K Guest

    Harlan Messinger wrote:
    > Reshma wrote:
    >> Hello:
    >>
    >> I am new to HTML and CSS. I came across this block of code, .link{
    >> color:#269;
    >> display:block;
    >> margin:4px 0 0 0;
    >> padding:2px 1em;
    >> }
    >>
    >> I am wondering what is the equivalent hex code for the color:#269 in
    >> the above.

    >
    > A three-digit RGB code #xyz is shorthand for a six-digit hex code
    > #xxyyzz. So, #226699.


    Correct. Also, you can use common colors by name (typically helps in
    visualizing better).

    For example:

    "color: black;" or "color: white;" are valid CSS properties. Modern
    browsers support more such named-colors than what is officially endorsed
    by W3C.

    http://www.w3.org/TR/CSS21/syndata.html#color-units

    Have fun,
    Animesh
     
    Animesh K, Nov 1, 2007
    #3
  4. Reshma

    Reshma Guest

    On Nov 2, 12:33 am, Harlan Messinger
    <> wrote:
    > Reshma wrote:
    > > Hello:

    >
    > > I am new to HTML and CSS. I came across this block of code, .link{
    > > color:#269;
    > > display:block;
    > > margin:4px 0 0 0;
    > > padding:2px 1em;
    > > }

    >
    > > I am wondering what is the equivalent hex code for the color:#269 in
    > > the above.

    >
    > A three-digit RGB code #xyz is shorthand for a six-digit hex code
    > #xxyyzz. So, #226699.


    Thank You.
     
    Reshma, Nov 1, 2007
    #4
  5. Harlan Messinger wrote:
    > Reshma wrote:
    >> Hello:
    >>
    >> I am new to HTML and CSS. I came across this block of code, .link{
    >> color:#269;
    >> display:block;
    >> margin:4px 0 0 0;
    >> padding:2px 1em;
    >> }
    >>
    >> I am wondering what is the equivalent hex code for the color:#269 in
    >> the above.

    >
    > A three-digit RGB code #xyz is shorthand for a six-digit hex code
    > #xxyyzz. So, #226699.


    I did not know that; I always use six-digit. How is browser support?

    --
    Blinky RLU 297263
    Killing all posts from Google Groups
    The Usenet Improvement Project - http://improve-usenet.org
     
    Blinky the Shark, Nov 1, 2007
    #5
  6. Reshma

    Animesh K Guest

    Blinky the Shark wrote:
    > Harlan Messinger wrote:
    >> Reshma wrote:
    >>> Hello:
    >>>
    >>> I am new to HTML and CSS. I came across this block of code, .link{
    >>> color:#269;
    >>> display:block;
    >>> margin:4px 0 0 0;
    >>> padding:2px 1em;
    >>> }
    >>>
    >>> I am wondering what is the equivalent hex code for the color:#269 in
    >>> the above.

    >> A three-digit RGB code #xyz is shorthand for a six-digit hex code
    >> #xxyyzz. So, #226699.

    >
    > I did not know that; I always use six-digit. How is browser support?
    >


    Since this method is used at CSS Zen garden too, I think it will have a
    good cross-browser support. Dave and Molly typically test Zen garden
    designs on various browsers before publishing (or so they claim).
     
    Animesh K, Nov 1, 2007
    #6
  7. Reshma

    Bone Ur Guest

    Well bust mah britches and call me cheeky, on Thu, 01 Nov 2007 21:55:30 GMT
    Blinky the Shark scribed:

    >>> I am wondering what is the equivalent hex code for the color:#269 in
    >>> the above.

    >>
    >> A three-digit RGB code #xyz is shorthand for a six-digit hex code
    >> #xxyyzz. So, #226699.

    >
    > I did not know that; I always use six-digit. How is browser support?


    ....To save 3 lousy alphanumeric digits per attribute?

    (I've had no trouble with any browser the few times I've done it.)

    --
    Bone Ur
    Cavemen have formidable pheromones.
     
    Bone Ur, Nov 1, 2007
    #7
  8. Reshma

    Dylan Parry Guest

    Animesh K wrote:

    > Dave and Molly typically test Zen garden designs on various browsers
    > before publishing (or so they claim).


    When you say Molly, I presume Holzschlag; but I'm not sure about Dave...
    the only one that springs to mind is Raggett. So put me out of my
    misery; Who is Dave?

    It's probably obvious that I never look at the Zen Garden ;)

    --
    Dylan Parry
    http://electricfreedom.org | http://webpageworkshop.co.uk

    The opinions stated above are not necessarily representative of
    those of my cats. All opinions expressed are entirely your own.
     
    Dylan Parry, Nov 2, 2007
    #8
  9. Reshma

    Els Guest

    Dylan Parry wrote:
    > Animesh K wrote:
    >
    >> Dave and Molly typically test Zen garden designs on various browsers
    >> before publishing (or so they claim).

    >
    > When you say Molly, I presume Holzschlag; but I'm not sure about Dave...
    > the only one that springs to mind is Raggett. So put me out of my
    > misery; Who is Dave?


    This is Dave:
    http://www.mezzoblue.com/

    (I didn't even know Molly helps him with CSS Zen Garden <g> )

    > It's probably obvious that I never look at the Zen Garden ;)


    Or subscribe to Dave's blog ;-)

    --
    Els http://locusmeus.com/
     
    Els, Nov 2, 2007
    #9
  10. Bone Ur wrote:
    > Well bust mah britches and call me cheeky, on Thu, 01 Nov 2007 21:55:30 GMT
    > Blinky the Shark scribed:
    >
    >>>> I am wondering what is the equivalent hex code for the color:#269 in
    >>>> the above.
    >>>
    >>> A three-digit RGB code #xyz is shorthand for a six-digit hex code
    >>> #xxyyzz. So, #226699.

    >>
    >> I did not know that; I always use six-digit. How is browser support?

    >
    > ...To save 3 lousy alphanumeric digits per attribute?


    I'll continue using six-digit codes. I just wondered about support.

    > (I've had no trouble with any browser the few times I've done it.)


    To save three lousy characters? ;)


    --
    Blinky RLU 297263
    Killing all posts from Google Groups
    The Usenet Improvement Project - http://improve-usenet.org
     
    Blinky the Shark, Nov 2, 2007
    #10
  11. Reshma

    Sparky Guest

    On Nov 1, 7:16 pm, Blinky the Shark <> wrote:
    > Bone Ur wrote:
    > > Well bust mah britches and call me cheeky, on Thu, 01 Nov 2007 21:55:30 GMT
    > > Blinky the Shark scribed:

    >
    > >>>> I am wondering what is the equivalent hex code for the color:#269 in
    > >>>> the above.

    >
    > >>> A three-digit RGB code #xyz is shorthand for a six-digit hex code
    > >>> #xxyyzz. So, #226699.

    >
    > >> I did not know that; I always use six-digit. How is browser support?

    >
    > > ...To save 3 lousy alphanumeric digits per attribute?

    >
    > I'll continue using six-digit codes. I just wondered about support.
    >
    > > (I've had no trouble with any browser the few times I've done it.)

    >
    > To save three lousy characters? ;)
    >
    > --
    > Blinky RLU 297263
    > Killing all posts from Google Groups
    > The Usenet Improvement Project -http://improve-usenet.org


    if you are on a mac you can get the exact hex code for any color on
    your screen
    go to Application > utilities > DigitalColor Meter
    open it and select 8 bit hex value,
    then make sure the reading point is at one pixel and the you can tell
    the color of each pixel
     
    Sparky, Nov 2, 2007
    #11
  12. Reshma

    dorayme Guest

    In article
    <>,
    Sparky <> wrote:

    > On Nov 1, 7:16 pm, Blinky the Shark <> wrote:
    > > Bone Ur wrote:
    > > > Well bust mah britches and call me cheeky, on Thu, 01 Nov 2007 21:55:30
    > > > GMT
    > > > Blinky the Shark scribed:

    > >
    > > >>>> I am wondering what is the equivalent hex code for the color:#269 in
    > > >>>> the above.

    > >
    > > >>> A three-digit RGB code #xyz is shorthand for a six-digit hex code
    > > >>> #xxyyzz. So, #226699.

    > >
    > > >> I did not know that; I always use six-digit. How is browser support?

    > >
    > > > ...To save 3 lousy alphanumeric digits per attribute?

    > >
    > > I'll continue using six-digit codes. I just wondered about support.
    > >
    > > > (I've had no trouble with any browser the few times I've done it.)

    > >
    > > To save three lousy characters? ;)


    3 chars multiplied by many instances adds up.

    > if you are on a mac you can get the exact hex code for any color on
    > your screen
    > go to Application > utilities > DigitalColor Meter
    > open it and select 8 bit hex value,
    > then make sure the reading point is at one pixel and the you can tell
    > the color of each pixel


    And you can copy/paste that value, it has quotes around it which
    must be removed (a nuisance... but it is better than a poke in
    the eye with a burnt stick).

    --
    dorayme
     
    dorayme, Nov 2, 2007
    #12
  13. Reshma

    Bone Ur Guest

    Well bust mah britches and call me cheeky, on Fri, 02 Nov 2007 01:16:02
    GMT Blinky the Shark scribed:

    >>>>> I am wondering what is the equivalent hex code for the color:#269
    >>>>> in the above.
    >>>>
    >>>> A three-digit RGB code #xyz is shorthand for a six-digit hex code
    >>>> #xxyyzz. So, #226699.
    >>>
    >>> I did not know that; I always use six-digit. How is browser
    >>> support?

    >>
    >> ...To save 3 lousy alphanumeric digits per attribute?

    >
    > I'll continue using six-digit codes. I just wondered about support.
    >
    >> (I've had no trouble with any browser the few times I've done it.)

    >
    > To save three lousy characters? ;)


    Strictly for experimental purposes or on those occasions when I suffered
    from key finger fatigue.

    --
    Bone Ur
    Cavemen have formidable pheromones.
     
    Bone Ur, Nov 2, 2007
    #13
  14. Reshma

    dorayme Guest

    In article <Xns99DBD8122C439boneurhyphe@85.214.62.108>,
    Bone Ur <> wrote:

    > Strictly for experimental purposes or on those occasions when I suffered
    > from key finger fatigue.


    What is the problem with 3 digit specs that you have ever found?

    --
    dorayme
     
    dorayme, Nov 2, 2007
    #14
  15. Bone Ur wrote:
    > Well bust mah britches and call me cheeky, on Fri, 02 Nov 2007 01:16:02
    > GMT Blinky the Shark scribed:
    >
    >>>>>> I am wondering what is the equivalent hex code for the color:#269
    >>>>>> in the above.
    >>>>>
    >>>>> A three-digit RGB code #xyz is shorthand for a six-digit hex code
    >>>>> #xxyyzz. So, #226699.
    >>>>
    >>>> I did not know that; I always use six-digit. How is browser
    >>>> support?
    >>>
    >>> ...To save 3 lousy alphanumeric digits per attribute?

    >>
    >> I'll continue using six-digit codes. I just wondered about support.
    >>
    >>> (I've had no trouble with any browser the few times I've done it.)

    >>
    >> To save three lousy characters? ;)

    >
    > Strictly for experimental purposes or on those occasions when I suffered
    > from key finger fatigue.


    But of course. :)

    --
    Blinky RLU 297263
    Killing all posts from Google Groups
    The Usenet Improvement Project - http://improve-usenet.org
     
    Blinky the Shark, Nov 2, 2007
    #15
  16. Reshma

    Bone Ur Guest

    Well bust mah britches and call me cheeky, on Fri, 02 Nov 2007 04:37:53
    GMT dorayme scribed:

    > In article <Xns99DBD8122C439boneurhyphe@85.214.62.108>,
    > Bone Ur <> wrote:
    >
    >> Strictly for experimental purposes or on those occasions when I
    >> suffered from key finger fatigue.

    >
    > What is the problem with 3 digit specs that you have ever found?


    I don't like them because they promote sloppy coloring. Standard colors
    don't have 3 groups of repeated digits; they're more like #808080 or
    #c0c0c0 or even #d4d0c8. What color is #aa8844?

    --
    Bone Ur
    Cavemen have formidable pheromones.
     
    Bone Ur, Nov 2, 2007
    #16
  17. Reshma

    dorayme Guest

    In article <Xns99DBEDF0170E3boneurhyphe@85.214.62.108>,
    Bone Ur <> wrote:

    > Well bust mah britches and call me cheeky, on Fri, 02 Nov 2007 04:37:53
    > GMT dorayme scribed:
    >
    > > In article <Xns99DBD8122C439boneurhyphe@85.214.62.108>,
    > > Bone Ur <> wrote:
    > >
    > >> Strictly for experimental purposes or on those occasions when I
    > >> suffered from key finger fatigue.

    > >
    > > What is the problem with 3 digit specs that you have ever found?

    >
    > I don't like them because they promote sloppy coloring. Standard colors
    > don't have 3 groups of repeated digits; they're more like #808080 or
    > #c0c0c0 or even #d4d0c8. What color is #aa8844?


    well, I have not been following closely the context of all this
    but if it were to promote such a thing then I am sure it would be
    bad and you would be quite right to point this out.

    But the real question is: Does it promote sloppy colouring? The
    answer to this depends on what the "it" in the last question
    refers to: if it refers to a person who mindlessly fixes to use
    *only* 3 numbers always, then yes, you are right. But at the cost
    of strawmaning your target.

    If the "it" refers to someone who sees no point in going #ffffff;
    when they can type #fff; but who has and succumbs to frequent
    desires to use such as #FFDEAD (NavajoWhite), then your case is
    not advanced.

    Perhaps the tendency to short form the colours does invite a lazy
    tendency in some people? But, you, being aware of the problem
    will not succumb. Be a devil and use the short where you can and
    not where you want nicer...

    There is an argument to say you should use the shorter. It is
    this: if you don't you will spend more time typing and reading
    longer code and this will sap energy that could be better devoted
    to choosing really nice colours when it would be appropriate.

    So, in other words, and to sum up, without any empirical evidence
    one way or the other, it is as likely that your colour judgements
    could be impaired by going one way as it is by going the other
    way.

    --
    dorayme
     
    dorayme, Nov 2, 2007
    #17
  18. Scripsit Reshma:

    > I am new to HTML and CSS.


    Then read a good book on them, starting from HTML.

    > I came across this block of code, .link{
    > color:#269;
    > display:block;
    > margin:4px 0 0 0;
    > padding:2px 1em;
    > }


    Just ignore it.

    > I am wondering what is the equivalent hex code for the color:#269 in
    > the above.


    What's the point in asking it here? If you tried to learn math, would you
    frequent Usenet groups, asking people to tell you how much 16 + 68 is?

    The point is that virtually any tutorial on CSS (even the crappy ones) tell
    you the various ways to specify colors and how they relate. Did you intend
    to manage without reading a single tutorial? Well, then you will probably
    copy and imitate crappy code like the one you quoted (apparently setting
    some links to a fixed color without setting background).

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Nov 2, 2007
    #18
  19. Reshma

    Dylan Parry Guest

    Els wrote:

    > This is Dave:
    > http://www.mezzoblue.com/


    Ah. I know the site, just not the Dave <g>

    >> It's probably obvious that I never look at the Zen Garden ;)

    >
    > Or subscribe to Dave's blog ;-)


    Believe it or not, I don't really /do/ blogs. Although I've recently
    started listening to Podcasts, so I'm slowly bringing myself into this
    millennium ;)

    --
    Dylan Parry
    http://electricfreedom.org | http://webpageworkshop.co.uk

    The opinions stated above are not necessarily representative of
    those of my cats. All opinions expressed are entirely your own.
     
    Dylan Parry, Nov 2, 2007
    #19
  20. Reshma

    Els Guest

    Dylan Parry wrote:

    > Els wrote:
    >
    >> This is Dave:
    >> http://www.mezzoblue.com/

    >
    > Ah. I know the site, just not the Dave <g>


    :)

    > Believe it or not, I don't really /do/ blogs.


    Not even mine? :p

    > Although I've recently
    > started listening to Podcasts, so I'm slowly bringing myself into this
    > millennium ;)


    I've listened to a couple of Podcasts, but it's not as good as I
    thought it would be. I thought I could just listen to them while doing
    other things, but that doesn't work. Apparently multi-tasking is a
    chronological concept, not a simultaneous one. I think I still prefer
    the pre-podcast method: listen to music while reading content, rather
    than listen to content while trying to do something else :)

    --
    Els http://locusmeus.com/
     
    Els, Nov 2, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    10
    Views:
    6,215
    Neredbojias
    Aug 19, 2005
  2. Bengt Richter
    Replies:
    6
    Views:
    471
    Juha Autero
    Aug 19, 2003
  3. jack
    Replies:
    4
    Views:
    588
  4. tim

    hex string to hex value

    tim, Nov 22, 2005, in forum: Python
    Replies:
    8
    Views:
    18,872
  5. tim
    Replies:
    2
    Views:
    1,563
    Dennis Lee Bieber
    Nov 23, 2005
Loading...

Share This Page