views:

97

answers:

6

What is the quikest method to see actual color of any hex code #a7a7a7?

When i work on other's CSS then if i deal with color codes then i quickly wan to see the color of that particular hex code.

suppose if i'm editing css in notepad and i found code #a7a7a7 then how can i know what is the color of this code.

If i have a color on my screen then i quickly know what would be hex code for this with the help of some tools ,but i need just opposite of this.

i'm not talking about to see whole color chart of site. I want to see color of particular hex code.

+3  A: 

You drop notepad as an editor and choose from one of the many freely available CSS editors?

Random example: http://speckyboy.com/2008/09/15/7-free-css-editors-which-is-the-best-you-choose/


EDIT: So... to make this a programming question, and since you are on Windows XP, I made a little HTA application that does color code previews:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:hta="http://tempuri.org/microsoft/hta"&gt;
<head>
  <title>Hex Helper</title>
  <hta:application 
    id="HexColor"
    version="0.1"
    applicationname="Hex Helper"
    sysmenu="yes"
    maximizebutton="no"
    minimizebutton="no"
    border="dialog"
    innerborder="no"
    scroll="no"
    selection="no"
    contextmenu="no"
    windowstate="normal"
  />
  <style type="text/css"> 
    * {
      border: 0 none; margin: 0; padding: 0; 
    }
    html, body { 
      height:100%;
      background-color: black; 
    }
    #container {
      padding: 5px; 
    }
    #preview {
      width: 130px; height: 90px; 
      border: 2px ridge;
    }
    #colorcode {
      width: 100%;
      height: 1.2em;
    }
  </style>
  <script type="text/javascript">
    var trim      = /^\s+|\s$/g;
    var fullColor = /^\s*#?([a-f0-9]{6})\s*$/;
    var abbrColor = /^\s*#?([a-f0-9])([a-f0-9])([a-f0-9])\s*$/;

    function setColor(hex) {
      hex = hex.replace(trim, "");

      var preview = document.getElementById("preview");
      var m = null;

      if (m = fullColor.exec(hex)) {
        preview.style.backgroundColor = "#"+m[1];
      } else if (m = abbrColor.exec(hex)) {
        preview.style.backgroundColor = "#"+m[1]+m[1]+m[2]+m[2]+m[3]+m[3];
      }
    }

    function setValue(preview) {
      var colorcode = document.getElementById("colorcode")
      colorcode.value=preview.style.backgroundColor;
    }
  </script>
</head>

<body onload="window.resizeTo(150,150)">
  <form action="#" id="container">
    <div id="preview" onclick="setValue(this);"></div>
    <input id="colorcode" type="text" maxlength="7" onkeyup="setColor(this.value);" />
  </form>
</body>
</html>

Save the above to a file called HexHelper.hta and run the file. Here is how it looks like. Feel free to modify in any way you want.

Hex Helper screen stot

Tomalak
this is not a point of my question , ok tell me how to see color of code in dreamweaver?
metal-gear-solid
suppose I opened a css file in dreamweaver code view and i have a code ##a7a7a7 , now how to see the color of this code.
metal-gear-solid
@metal: Easy - you drop Dreamweaver as a CSS editor and... Seriously, why do you want to edit CSS in the wrong tools? I suppose there is a small program that does what you want, though. Tried searching the Windows Gadget gallery already?
Tomalak
i need a tool like where i can paste the code and see the color
metal-gear-solid
Tomalak
thanks looking but i'm on Windows XP so i can't use this tool.
metal-gear-solid
@Tomalak which free CSS editor has facility like this http://stackoverflow.com/questions/2703462/what-is-the-quikest-method-to-see-actual-color-of-any-hex-code-a7a7a7/2703548#2703548 ?
metal-gear-solid
@Tomalak - wow - awesome
metal-gear-solid
@metal: Oh, I didn't mention. Save it to a file called `HexHelper.hta` and run that file.
Tomalak
A: 

Photoshop? I don't see how this is really a question for the SO community but I work a lot with photoshop and typically have photoshop running in the background. That way I can easily switch to photoshop and use the color tool to look a different hex values. There's also plenty of tools on the web for this. On which I'm particulary fond of is the Color Scheme Designer 3. Just click the hex value and enter your color hex value and it will show you what color it is.

Eventually you wouldn't need these tools, you should be able to learn what codes map to what color space. And just go with the feeling of what a particular hex color value might look like.

John Leidegren
you are not getting my question.. "If i have a color on my screen then i quickly know what would be hex code for this with the help of some tools ,but i need just opposite of this."
metal-gear-solid
@metal - He understands your question perfectly. Photoshop's color picker allows you to input a hex value and see the color it represents.
Jimmy Cuadra
@Jimmy - but that i already know and I asked for quick solution
metal-gear-solid
Then I don't see the point of this question at all? You can easily use print screen and the color picker inside photoshop to grab a color from any screen on your computer and you can easily use the color dialog to find a new color. If that's not what you want then your asking for something very unfamiliar and strange.
John Leidegren
+2  A: 

After searching a lot i found a good online tool to do this

http://chir.ag/projects/name-that-color/

Here we can paste code and see the color.

alt text

metal-gear-solid
awesome!! Chirag is also having some other little cool projects
Rakesh Juyal
A: 

This might sound crazy, but yeah this is very easy and handy to do. write a plain html.

<html>
  <body bgcolor="#a7a7a7"></body>
</html>

now, open this page on your browser. Keep on changing bgcolor to whatever color you want to see and refreshing the browser :)

another option is, create any html and include the css you are trying to edit. Open that page on firefox, now using firebug you can see the color. { Just hover over the css color code and you will see the color ]

alt text

Rakesh Juyal
this is very long . i was not asking for this. just to see color i don't want to create HTML page and go to firefox ,firegbug.
metal-gear-solid
+2  A: 
  1. Open ColorZilla firefox addon
  2. type color code
  3. press enter.
Brij
A: 

This tool is pretty useful and is free:

http://www.iconico.com/colorpic/

Mark Redman