Web Hosting Talk







View Full Version : Image and Html Color


MikeM
06-28-2001, 11:12 AM
Maybe i'm an idiot?

I've been trying for the last 2 hours to Match a back ground colour in an image to the corresponding HTML code. (I'm trying to create a custom logo, and I'd like the backfround to match the page background colour) the Image color is just a degree lighter, and i'm not sure why.

I have used (for image)
Fireworks 4
Paint Shop Pro 6
Photoshop 5.5
Ulead smart pro 3
Corel Photohouse 2.....

Nothing will match the color picked from dreamweaver three...........

Is it possible to match these colors exactly......

I've tryed rgb and hex.. to no avail.

any idea's, or do i need to mess with it more.....

(SH)Saeed
06-28-2001, 11:33 AM
Well.. first of all, when you save your image you should do it in Photoshop using the File > Save for web..* option. Secondly, you choose the background color and then click on the color (on the left toolbar) to get the HEX code. You take this code and put it as your HTML background in Dreamweaver.

* This option is available in Photoshop 5.5 and later.


Another way would be to do Image > Mode > Indexed color.. in Photoshop prior to saving your image. Then you would do File > Export > Gif89a Export.. and then you click on the background in the new window that pops up to remove it. You can remove any colors you want by clicking on them. When you have selected the colors you want, you simply save this picture and all the selected colors are now transparent. Put it in your webpage to look at the result.

Good luck.

i am a
06-28-2001, 11:50 AM
it's harder to do than you'd think, unfortunately, i remember a webmonkey article saying that there are actually only like 32 or so web safe colours... :(

try keeping your images to .gif, the .jpg change colour when compressed (actually, so do .gif, depending on mac / pc, what colour your socks are, etc...)

try with safe colours too... (like hex values of 00,33,66,99,CC,FF) etc... that'll usually keep you okay...

akashik
06-28-2001, 01:31 PM
This is how I do it (as I used to suffer that problem myself once).

- Make the image in photoshop as usual. Save out as a psd (using RGB).
- Open fireworks an import the image as a psd. Optimise/Slice/Dice or whatever, then export as a jpg or gif
- Ta Da.. your image should mach the original color.

* Possible problems. If you start in photoshop with the RGB you *think* matches the html version it probably won't. Something in the way the palettes are set up means #660000 etc isn't quite the same.

The best way to avoid this is to start in Fireworks. Select the background color and make a small square - export that out as a gif.
Fire up Photoshop, open this square and use that as the color selection for the background. Build the graphic on top of that color, save as psd, then go to the first suggestion.

* Another possible problem.
I'm sure you know this one but just in case. When optimizing sometimes cutting a gif back to 32 or 16 colors will affect the background color a little - not enough to notice right away, but shows up when you place the graphic next to the 'original' color.

Hope that helps.

Greg Moore

MikeM
06-28-2001, 02:37 PM
Thank you......
Some very good suggestions that i have to try when i get home....