css color! ???

Discussion in 'Programming' started by calisonder, May 7, 2007.

  1. #1
    wow i saw this somewhere but didn't know you could do it.

    em { color: rgb(255,0,0) }


    if i understand that right, can i create any color i want and it would be compatable with all browsers?

    i am only using web hexidecimel colors, and if theres a color that i want for my background for instance that is not a web color, i would have to make a small image of the color i want, and then tile it across the bg, which obviously hurts load times.
     
    calisonder, May 7, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    The color value can be a name (blue, red, green), a hex number (#000000), or an rgb value. (rgb(255,0,0)).

    And it works in all browsers.
     
    nico_swd, May 8, 2007 IP
  3. Your Content

    Your Content Banned

    Messages:
    1,096
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can find a usefule chart with the values for both hexadecimal and RGB colors at this address www.pitt.edu/~nisg/cis/web/cgi/rgb.html

    Even you can use their names instead of values and the browswer will translate them correctly
     
    Your Content, May 8, 2007 IP