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...
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.
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.