Jump to content

Background Gradient And Matching Colors


ocellnuri

Recommended Posts

I've just redesigned my blog at blog.ocell.net. I haven't done web-dev in years, and I basically reverse engineered a Blogger template, learning CSS along the way.

 

I want a gradient background, so I made a one pixel wide image that starts white and ends blueish, repeating across the page. Then I tried to match the hex value for that final blue hue in the image with the background color set in the browser by my css file. It looks great in Firefox, but the colors don't match up in Safari or IE.

 

How can I choose a color that can be reproduced in my image, and reproduced by all Browsers?

 

Thanks in advance for any help!

Link to comment
Share on other sites

I've just redesigned my blog at blog.ocell.net. I haven't done web-dev in years, and I basically reverse engineered a Blogger template, learning CSS along the way.

 

I want a gradient background, so I made a one pixel wide image that starts white and ends blueish, repeating across the page. Then I tried to match the hex value for that final blue hue in the image with the background color set in the browser by my css file. It looks great in Firefox, but the colors don't match up in Safari or IE.

 

How can I choose a color that can be reproduced in my image, and reproduced by all Browsers?

 

Thanks in advance for any help!

 

try this...

 

http://www.verchi.com/tech/html/colorchart.htm

 

Lee

Link to comment
Share on other sites

Thanks.

 

Now it looks like my problem is my color settings in Photoshop... everything that's blue in Windows comes up Purple in OSX. I just made a colorsafe jpg in Windows, and it shows up purplish in safari but safari renders the web-smart color as blue.

 

I've really stepped in it.

Link to comment
Share on other sites

Thanks.

 

Now it looks like my problem is my color settings in Photoshop... everything that's blue in Windows comes up Purple in OSX. I just made a colorsafe jpg in Windows, and it shows up purplish in safari but safari renders the web-smart color as blue.

 

I've really stepped in it.

 

what version of PhotoShop are you using?

 

Lee

Link to comment
Share on other sites

I'm using Photoshop CS.

 

If you're still looking at the page at all, you'll see that I've tried to match grey, and I can't get that to work.  :D

 

 

What is the version number? Before version 6, Photoshop wasn't quite geared to the web yet. You might take a look in the edit menu of photoshop under color settings and see what you have there

 

Lee

Link to comment
Share on other sites

Well I had decided it was too late to work on this, and I got in bed, and I had an idea... knowing I wouldn't be able to sleep until I tried it. And even better, it solved my problem! I'm posting it here in case anyone else goes crazy trying to do a gradient background that works across systems.

 

Instead of making a background image that fades from white to my target background color, I made an image that fades from white to transparent. I saved it as a PNG. Now I can change the background color in my style sheet without having to make a new image every time.

 

If this is a bad idea, please let me know. Thanks again for the help!

Link to comment
Share on other sites

Consider your target audience. If a significant number of them have older browsers then PNGs may not be the way to go since the older browsers didn't consistently support them.

 

If most of them have the new browsers you shouldn't have a problem. You can check your AWStats to see what they are using.

 

Note: "significant" and "most" are for you to define based on your site type, purpose, audience, etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...