You can copy the current foreground color
or a color in an image as a hexadecimal value while in the main
work area (not the Save For Web & Devices dialog box).
Copy the color by doing one of the following:
Set the foreground color using the Color
palette, the Swatches palette, or the Adobe Color Picker. Choose
Copy Color As HTML from the Color palette menu.
With the Eyedropper tool selected, move the pointer
over the color that you want to copy, and then right-click (Windows)
or Control‑click (Mac OS) and choose Copy Color As HTML
from the context menu
The color is copied to the clipboard as the HTML
COLOR attribute with the hexadecimal value (color=#xxyyzz).
To paste the color into an HTML file, open the target
file in an HTML editing application and choose Edit >
Paste.