SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33
  1. #26
    :) delemtri's Avatar
    Join Date
    Jun 2001
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  2. #27
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by prowsej
    Why are hex codes preferable to specifying the colors by name?
    because:

    - there's not a name for each of the 16,777,216 colors
    - not all browsers use/understand the names
    - hex is cooler

  3. #28
    SitePoint Wizard silver trophy
    beley's Avatar
    Join Date
    May 2001
    Location
    LaGrange, Georgia
    Posts
    6,117
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I've found a GREAT program that lists all the colors and values, and their COMPLIMENTARY colors!! Great for color schemes! Check it out::

    http://www.colorschemer.com/

  4. #29
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by DR_LaRRY_PEpPeR


    because:

    - there's not a name for each of the 16,777,216 colors
    - not all browsers use/understand the names
    - hex is cooler
    My understanding of colours and computing and colour theory is pretty basic. However, I cannot see how you can express so many colours with a three digit hexidecimal number.

    16^3 = 4096

    But even 4096 names of colours would be a bit much to remember

    I'm scratching my head here thinking that you cannot express so many colours with as a three digit hexidecimal. Please correct me if I am wrong.

    <<edited>>

    silly me , I forgot that R, G and B are each represented by a two digit hexidecimal. So the max number of colours you can express would be:

    (16^2)^3 = 16^6 = 16777216

    Eureka - now I understand

    <<edited another time - I'll get my maths right one day>>
    Last edited by freakysid; Jul 10, 2001 at 07:03.

  5. #30
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use hex, and just have a guess at what the code would be, using the RRGGBB rule. If it's not right, I just use trial and error till I get the right colour.

    And wouldn't the number of colours possible from the hexadecimal be 16^6 because there are 6 individual chars with 16 possible values each. So the number of colours (as you rightly said to begin with) is 16,777,216.

    - Will

  6. #31
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks W1LL, maths is not my strong point.

  7. #32
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem, I recently finished the AS course in Statistics.
    You probably won't know of AS unless you're in year 12 in UK. Basically, it's getter than GCSE, but not as good as A level. Kind of a "half-way house".

    - Will

  8. #33
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well -- I hand coded all 216 colors in a table a while back before I really knew PHP and it looks a lot like FreakySid's little PHP code snippet but only formatted differently with the Hex and RGB codes overlaying the colors. But, it took me five and a half hours to make that, not to mention a blisteringly large HTML file. I really wish I had known PHP back then -- I could have just dones someting similar and had PHP dynamically create the whole thing. ::sigh::
    But now I know -- use PHP! >=)
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.


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
  •