Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design

Zach Saul
Zach Saul
11,156 Points

Trouble matching colors from photoshop to CSS/HTML hex values -

I am having trouble getting some design elements I created in photoshop to match HTML/CSS hexidecimal color values

(in a nutshell when the website i'm designing is loaded the image which i imported from photoshop differs ever so slightly in hue from the identical hexadecimal value that I applied to a CSS border)

I know this MUST be a common problem and I'm wondering what the solution is - im using CS6 (photoshop)

Hey man. So, I've worked a lot with photoshop and here's what I've come up with. The hex colors in photoshop are actually off by a small margin from the html hex colors. Here's the solution: take a screenshot of the page with the color somewhere on there, open it in photoshop, and use the tool to pick up the color. (By this, I mean click on the select color where you can type hex or pick different colors from the pallet and if you have an image open, you can click somewhere on the image to select the color of voice. Do this, and you will see what the correct hex is in photoshop as opposed to html.

Yeah, CS6 is the one I have currently and I have a similar issue. I just try to avoid it completely, but it happens.

1 Answer

Grace Faires
Grace Faires
5,435 Points

Hey Zach,

I think it could be to do with the colour space you're working in... I found this topic on the Adobe Forum which may be of some help?

https://forums.adobe.com/thread/1074577?tstart=0

I agree with Grace, check your color mode, make sure your using sRGB and your not embedding a profile from RGB into the file.