Results 1 to 5 of 5

Thread: HEX color values + 123 colors

  1. #1
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HEX color values + 123 colors

    ok, so we all know there are 16 characters in hex.

    0-0 d-13
    1-1 e-14
    2-2 f-15
    3-3
    4-4
    5-5
    6-6
    7-7
    8-8
    9-9
    a-10
    b-11
    c-12

    how can one implement these colors into the colors that one must use to make an image? You know, from:
    RED:0-255
    GREEN:0-255
    BLUE:0-255

    What is the equivilant to

    006699 in the graphic color code?
    ?
    RED:12
    GREEN:200
    Blue:10
    ?
    Thank You if You do know the answer, and thank you if you don't know it.
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    They're exactly the same values. The only difference is that in a lot of image editing suites, the values are in decimal, not hexadecimal. Most calculator programs have a conversion utility.
    In Windows "calc":
    • View->Scientific
    • Select "hex"
    • Enter your hexadecimal number
    • Select "dec"


    In KDE's "kcalc":
    • Make sure Settings->Logic Buttons is ticked
    • Select "Hex"
    • Enter hexadecimal number
    • Select "Dec"


    In Gnome's "gnome-calculator":
    • View->Scientific
    • Select "Hex"
    • Enter hexadecimal number
    • Select "Dec"
    Last edited by Twey; 07-26-2005 at 12:23 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok, so for example:

    006699 would be 26265?

    what do you do with that number?

    how do you know how much goes to red, green or blue????
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    HTML colour codes aren't one number, but are split into three two-digit hex numbers: red, green, blue. Let me give you an example...
    #00ff99 means "00 red, ff green, 99 blue." You'd convert them individually - 00ff99 all together means nothing.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by IanMarlowe
    006699 would be 26265?
    0x6699 is 26265 decimal, but that isn't how it works.

    how do you know how much goes to red, green or blue????
    Hexadecimal colour codes are the concatenation of three single or double hexadecimal digits. That is, #RGB or #RRGGBB. So, #006699 is 0x00 (0) red, 0x66 (102) green, and 0x99 (153) blue. It could also be written as #069 as the three single-digit form is parsed by repeating each digit. For example, #3fa to #33ffaa.

    Mike

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
  •