SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,931
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Names for Colors...

    Is there an "authoritative" place to find *Names* for Hexadecimal Colors?

    Or isn't there such a thing?!

    Here is a link to a site tat seems pretty neat.


    Debbie

  2. #2
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,617
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    The HTML 4.01 spec only officially supports 16 color names: http://www.w3.org/TR/REC-html40/types.html#h-6.5

    Note that orange is missing from the HTML 4.01 spec, but was later included in the CSS 2.1 spec.

    The long lost of color names is actually the X11 color name list, and was originally defined for the X Windows System in the linux world. Most modern browsers have adopted this list of names. The X11 color names, plus some of the color names from the SVG 1.0 spec are now officially included in the CSS3 spec. http://www.w3.org/TR/css3-color/#svg-color

    Most likely, you won't have any trouble with them, but generally, I can't say I used any names beyond the standard 17 in the HTML 4.01 & CSS 2.1 specs. After that, I just use HEX values.

    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    ... and because of the inconsitencies force flow listed, that's why I don't use named, and suggest you forget they even exist. Hex colors are so simple, I can't understand why anyone uses anything else -- with the possible exception of using the decimal RGB inside scripts.

  4. #4
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,931
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    ... and because of the inconsitencies force flow listed, that's why I don't use named, and suggest you forget they even exist. Hex colors are so simple, I can't understand why anyone uses anything else -- with the possible exception of using the decimal RGB inside scripts.
    I *do* use only Hexadecimal...

    But I also don't know *which* Hexadecimal code is the official one for "pink" or "orange" or "gray".

    What I am looking for is a way to *cross-reference* things, while still using an authoritative source...


    Debbie

  5. #5
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    I *do* use only Hexadecimal...

    But I also don't know *which* Hexadecimal code is the official one for "pink" or "orange" or "gray".

    What I am looking for is a way to *cross-reference* things, while still using an authoritative source...
    Ok, guess I'm just not getting the point then...

  6. #6
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,931
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    Ok, guess I'm just not getting the point then...
    If I want "red" then I'd choose "#FF0000"

    If I want "blue", then I'd choose "#0000FF"

    If I want "pink", what do I choose?

    It is not intuitive picking combinations of RGB...

    And if I "eye it" then I could be off?!

    I assume there is some (fairly) universal definition of what "pink" or "orange" or "gray" or "purple" are in RGB/Hexadecimal terms... Right?!

    So I was asking for a Cross-Reference Table between "Color Names" and "Hexadecimal/RGB Codes", so that I don't have to "eye it"...

    Make sense?


    Debbie

  7. #7
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    If I want "red" then I'd choose "#FF0000"

    If I want "blue", then I'd choose "#0000FF"

    If I want "pink", what do I choose?

    It is not intuitive picking combinations of RGB...

    And if I "eye it" then I could be off?!
    It depends ... off from what? The colours you want are the colours you want. I would rarely use the 16 named colours on a web page because they're just a bit too primary, a bit too bright and garish, for my taste. Unless you're trying to colour-match a particular scheme (in which case, just drop the picture into a graphics program and do a colour pick on the shade you want), you choose the colours, that's what design means.

  8. #8
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,931
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stevie D View Post
    It depends ... off from what? The colours you want are the colours you want. I would rarely use the 16 named colours on a web page because they're just a bit too primary, a bit too bright and garish, for my taste. Unless you're trying to colour-match a particular scheme (in which case, just drop the picture into a graphics program and do a colour pick on the shade you want), you choose the colours, that's what design means.
    You're missing the point....

    There is mathematical definition for "pink" out there.

    And guessing what is "true pink" using my eye is not very precise.

    Last night I wanted to know what the Hex was for "true Pink" because it is not intuitive like #FF0000 for "Red".

    I'm not asking how to choose the *best color shade of* pink, which is what you're talking about...

    That is a different topic.


    Debbie

  9. #9
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    A bit of basic arithmetic would do you fine in that case!

    Pink is a mix of red and white. So you need to take an average of #f00 and #fff - or it might be easier to think of them as rgb(255,0,0) and rgb(255,255,255). Taking the midpoint of each of the three colour scales gives rgb(255,128,128), or #f88.

    The problem is that according to the colour chart on w3schools, there is no named colour at #f88, and HTML defines 'pink' to be #ffc0cb. That is undoubtedly a shade of pink, but so is #f88. Which is most definitively "pink"? Why is a random shade agreed by a committee any more "real" than one arrived at by pure maths?

  10. #10
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    It is not intuitive picking combinations of RGB...
    The RGB color wheel is no more difficult than CMY -- unless you're still stuck on the completely inaccurate nonsense they teach in grade school of RYB...

    Pink is just light red, so add the other two color channels evenly to red until you get the pink you want... #FEE being pretty light, #F88 being dark enough to be considered red again. Shifting it slightly towards magenta by adding blue can make it 'pop'.

    Though my understanding of it could stem from all those years low level programming it as 4 bit binary... where you had IRGB -- the top bit being intensity. As such I learned very quickly that blue+green = cyan, blue+red=magenta, and green+red=yellow, for the original 16 CGA colors:

    Code:
    Binary  Decimal  Name       24 bit Hex/Description
    0000    0        Black          #000
    0001    1        Blue           #00A
    0010    2        Green          #0A0
    0011    3        Cyan           #0AA
    0100    4        Red            #A00
    0101    5        Magenta        #A0A
    0110    6        Ochre*         #AA0 * CGA monitors convert this to Brown #A50
    0111    7        Light Gray     #AAA
    1000    8        Dark Grey      #555
    1001    9        Light Blue     #55F
    1010    10       Light Green    #5F5
    1011    11       Light Cyan     #5FF
    1100    12       Light Red      #F55
    1101    13       Light Magenta  #F5F
    1110    14       Yellow         #FF5 * SOME CGA monitors convert this to #FF0
    1111    15       White          #FFF
    Because I learned that 30 years ago and to program it via binary, I guess doing it today on the fly with a wider range of possibilities just comes naturally to me... that I paint and know the CMY set probably also helps.

    Rather than learning names, I'd suggest putting effort into the RGB color wheel, and how to linear lighten and darken values. Additive luminance is a bit different from what people learn early on (subtractive pigments) but it's the same basic idea, it's just shifted 60 degrees on the wheel.

  11. #11
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,931
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stevie D View Post
    A bit of basic arithmetic would do you fine in that case!

    Pink is a mix of red and white. So you need to take an average of #f00 and #fff - or it might be easier to think of them as rgb(255,0,0) and rgb(255,255,255). Taking the midpoint of each of the three colour scales gives rgb(255,128,128), or #f88.

    The problem is that according to the colour chart on w3schools, there is no named colour at #f88, and HTML defines 'pink' to be #ffc0cb. That is undoubtedly a shade of pink, but so is #f88. Which is most definitively "pink"? Why is a random shade agreed by a committee any more "real" than one arrived at by pure maths?
    Interesting.

    Still, my point was that having a table that cross-references "Named Colors" and "Hex Colors" would be handy. Not all colors are as simple (e.g. "brown", "purple", etc.) as your example.

    Guess I'll use the links above if needed.

    Thanks,


    Debbie


Bookmarks

Posting Permissions

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