soycharliente Posted July 29, 2007 Share Posted July 29, 2007 I know how to write color codes and I know that I can find a million color codes on-line. Does anyone know if the default color codes for just typing a color is set by someone and where I could find them? Examples: black = #000000 white = #ffffff pure blue = #0000ff I'm looking for the default value for things like orange, gray, pink, purple, etc. Are they set on my computer based on what browser I have, based on what OS I have, etc.? I hope that none of that is confusing. I found this page (http://www.w3schools.com/html/html_colornames.asp), and yeah it's by w3c, but it could just be someone else's opinion of what the color code should be. Could these be those default values that I'm looking for? Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 29, 2007 Share Posted July 29, 2007 There really aren't any. What looks like orange to you looks like a red-orange to someone else and an yellow-orange to another person. The 'named' colours are as standard as you're going to get and moderately useful, but hope you don't get too many clients who want "A nice blue, you know". Nobody can confuse RGB notation (and the triplets can be compressed - #ff6600 is the same as #f60 (some kind of orange or other) Quote Link to comment Share on other sites More sharing options...
soycharliente Posted July 30, 2007 Author Share Posted July 30, 2007 I understand and already know all of that. I just wanted to know where I can get the hex that is being used by typing out pink or purple. I want to get those colors and mess with them, but I can't figure out the hex values for them. Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 30, 2007 Share Posted July 30, 2007 The colour names and the hex values are on the page you referenced to start this thread. Am I missing the point of your question? Quote Link to comment Share on other sites More sharing options...
soycharliente Posted July 30, 2007 Author Share Posted July 30, 2007 I guess not. There are a million pages out there with people giving out codes for what they might think pink or purple is. I could find 10 different ways to show quote purple unquote. I just wasn't sure if that page was just another opinion of what they think the code should be. W3C is a pretty trusted site, but I didn't know if I needed to look somewhere else. Thanks. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 30, 2007 Share Posted July 30, 2007 AFAIK those are correct. If you are unsure you can always create a table with two columns side by side, on of the side fills in the background using the name of the color, eg bgcolor="blue" whilst the other columns use a hex for the background color bgcolor="#0000FF That way you can visually compare the colour differences. Heres a few random colors picked. <style> td { height: 30px; text-align: center; } </style> <table border="0" cellspacing="3" cellpadding="0" width="500"> <tr> <td width="33%">COLOR</td> <td width="33%"></td> <td width="33%">HEX</td> </tr> <?php $colors = array( 'Blue' => '#0000FF', 'AntiqueWhite' => '#FAEBD7', 'Chartreuse' => '#7FFF00', 'DarkGreen' => '#006400', 'Fuchsia' => '#FF00FF', 'LightSeaGreen' => '#20B2AA' ); ksort($colors); foreach($colors as $color => $hex) { echo " <tr>\n "; echo '<td bgcolor="' . $color . '"></td>'; echo '<td>' . $color . '</td>'; echo '<td bgcolor="' . $hex . "\"></td>\n </tr>\n"; } ?> </table> Quote Link to comment Share on other sites More sharing options...
soycharliente Posted July 30, 2007 Author Share Posted July 30, 2007 Could a video card, browser, or OS make those colors APPEAR different? Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 30, 2007 Share Posted July 30, 2007 Could a video card, browser, or OS make those colors APPEAR different? They would look differently, but the hex/rgb code would look like the "name" code. I.e. blue and #00f would look the same on the same monitor although it may look different on another monitor. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.