Skip navigation
bobrock4567
Currently Being Moderated

rgb in jpeg makes differences from rgb in css?

Oct 31, 2011 4:27 AM

Tags: #photoshop #rgb #mac #color_management

Hi all

 

I take the a rgb color from the original image (it was in pdf):

26,23,27

 

 

I made a jpg using this rgb as background color.

 

I also use a css command

body { background-color: rgb(26,23,27); }

 

I put my image in the html page with that background and on screen you can notice differences between body background and image background..

 

Are there any solutions?

 

Ciao

 

Roberto

 
Replies
  • Currently Being Moderated
    Oct 31, 2011 9:03 AM   in reply to bobrock4567

    it is going to make a difference which browser you are testing, you know, it might also be useful to include a screenshot of the difference, or better a link to your page

     

    i haven't experimented much with css colormanagement, but for a solution,  you may want to try Converting the image to sRGB, stripping the profile from the image and not specifying a css profile in html/css -- if you are trying to blend a pixel image into a html background (that way the same profile will be used on both elements)

     

    if you do get it to work, I would be interested in how you did it...

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 3, 2011 2:12 AM   in reply to bobrock4567

    Ciao, Roberto

     

    Any uncalibrated RGB is device dependent —that is: It's appearance will change depending on the device representing those numbers—. Raw RGB numbers are uncalibrated unless used under the umbrella of a colour profile.

     

    Your best bet is, as gator soup points, to put both sets of numbers —picture colours and css values— in the same park so that even if they are missinterpreted by any piece of software, they will be missinterpreted  exactly in the same way, so that you won't see any difference between same sets of values.

     

    And sRGB is a good (best?) profile to work as a basis for colours in web images and pages. So, all raw RGB saved and worked under it will be driven, at least, into the same set.

     

    Hope it helps.

     

    Gustavo

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 12, 2011 1:05 AM   in reply to bobrock4567

    The correct way to get especific color in browsers is convert the colors to hexadecimal and the photos to sRGB through photoshop and the convert to web and devices, there you will see that convert to srgb  is enabled by default.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points