www.webdeveloper.com
Results 1 to 11 of 11

Thread: What Kind Of Color Code Is This?

  1. #1
    Join Date
    Aug 2005
    Posts
    8

    What Kind Of Color Code Is This?

    I wasn't sure where to post this because I have no idea what it is. The only thing I know about it is that it is a color code but I need to know what color it is and how convert normal color codes into this format.

    Code Examples:
    • 0x30ffffff

    • 0x12000000

    • 0xffffffff (I know this is white)


    Any help would be greatly appreciated

    Thanks,
    Styles
    Last edited by Styles2304; 08-17-2005 at 11:03 AM.

  2. #2
    Join Date
    Aug 2005
    Posts
    40
    is that the exact code? what did you find it in? I've only ever seen color codes in your standard hexadecimal or an rgb triplet. which one of those are you wanting to convert to?

  3. #3
    Join Date
    Aug 2005
    Posts
    8
    Those are the exact codes. It's actual for an Xecuter 3 Bios skin and I guess I don't really want to convert the weird codes to anything, I want to be able to convert hexadecimal to . . . well . . . whatever that is.

  4. #4
    Join Date
    Mar 2004
    Posts
    3,056
    Don't worry, it's very simple. Here's how it goes:

    The first two characters "0x" just mean it's a hexadecimal number. The next six are the hexadecimal bumbers for the colour. It's in the format of RGB Hex. Sounds complicated, I know, but it isn't.

    Hex numbers are like normal numbers ecxept single numbers go a bit higher. In normal decimal, numbers go from 0 to 9 right? Well in hex, they go from 0 to 15. The difference being that when we get past 9, we use the first few letters of the alphabet. So, 0 is still 0 and 5 is still 5 and so on right up to 9, then 10 is A, 11 is B, 12 is C ,13 is D, 14 is E and 15 is F.

    The grouping of the six numbers go in the order of Red, then Green, then Blue. The first two numbers are for how much red is in the colour, the next two for how much green is in the colour, and the last two say how much blue is in the colour. So, if you wanted to say something should be completely red, you'd say 0xFF0000 (Hex number -> Full red, no grenn and no blue). So a solid green is 0x00FF00 and a solid blue is 0x0000FF.

    You get all your colours by mixing the colours together, So purple would be around 0xAD1580 maybe. That being a lot of red, just a touch of green for effect, and quite a bit of blue. Always think of mixing and making your colours as if you're mixing light. You get different results from mixing physical pigmented paint and light, it's light you're dealing with here and the ammount of "light" you apply also counts.

    Example:

    0xBBBBBB and 0x444444 are both grey colors, but 0xBBBBBB is a much lighter shade of grey than 0x444444 because in 0xBBBBBB you have applied much more light (B is a higher number than 4).

  5. #5
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Quote Originally Posted by Mr Herer
    The first two characters "0x" just mean it's a hexadecimal number. The next six are the hexadecimal bumbers for the colour. It's in the format of RGB Hex. Sounds complicated, I know, but it isn't.
    That's what I thought at first but, there's eight digits after the "0x", so that theory doesn't work.
    Disclaimer. (1) Whilst I will help you sometimes, if I feel like it, and my advice in relation to your actual question will be of good quality: my posts are to be taken with a pinch of salt. I will be sarcastic, deploy irony and include obscure cultural references for my own amusement without warning.
    (2) You will gain nothing from complaining, and if you try to argue with me then you will not win. No matter how noble your battle seems, I am still better than you, don't be an hero.

  6. #6
    Join Date
    Aug 2005
    Posts
    8
    Exactly right, I've been looking all day and I can't find anything. I just coppied and pasted them so I don't know what to do . . . I'll paste the whole .ini file so you can see what I'm talking about.

    background = HaloX.bmp
    font = DS_DIGITAL_BOLD.TTF
    selectorcolor = 0x30ffffff
    fontcolor = 0xffffffff
    fontsize = 20
    menu_rect = 104,155,540,330
    menu_bg_color = 0x12000000
    scrollbar = 1


    ################################################################
    #
    # keyboard color :
    #
    # keyboard color = <unselected color><selected color><font color>
    #
    ###############################################################

    keyboard font = ARIALNB.TTF
    keyboard color = 0x331E3773 0x334444ff 0xffffffff



    ###############################################################
    #
    # settingname = (alignment),(x),(y),(fontcolor),(output)
    #
    # alignment can be R for right, C for center and L for left
    #
    # output is how string should be outputted
    #
    ###############################################################

    buildversion=L,82,350,0xffffffff;X3 Detected: Build %d
    mcpx temperature=L,82,375,0x007FA2E2;%s
    cpu temperature=R,562,375,0x007FA2E2;%s
    ip=L,82,400,0x007FA2E2;IP : %s
    clock=R,562,400,0x007FA2E2;%s
    dip=R,562,350,0xffffffff;Dip Bank Select: %s
    hddstatus=C,320,120,0xffffffff;C: %s E: %s F: %s G: %s

  7. #7
    Join Date
    Aug 2005
    Posts
    8
    Could it be Hex for ARGB?

  8. #8
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,152
    I was guessing either 2 of the digits are for gamma, or it could be CYMB (cyan/yellow/magenta/black - often used for printer colors).
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  9. #9
    Join Date
    Aug 2005
    Posts
    8
    I'm gonna play with some regular hex code and see what the outcome is.

  10. #10
    Join Date
    Aug 2005
    Posts
    8
    Ok, I just figured it out but thanks for all your help. The 0x is nothing, just always there.

    The first two digits of the last 8 control the opacity where the last 6 digits are just regular hex code.

    Again, thanks for the help

  11. #11
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,152
    Quote Originally Posted by Styles2304
    ...The 0x is nothing, just always there....
    The 0x is a common method in many programming languages to indicate that the following string of characters represents a hexadecimal number. Just an FYI.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles