Mobile app version of vmapp.org
Login or Join
Alves566

: What would cause a Hex and RGB value to differ between online and photoshop? style { background-color: rgb(224,224,195); } Should be the same as: style { background-color: #f4e0c3; } According to

@Alves566

Posted in: #Css #Hex #Rgb

style {
background-color: rgb(224,224,195);
}


Should be the same as:

style {
background-color: #f4e0c3 ;
}


According to Photoshop which I checked a few times:



But when I use the RGB value in my CSS I'm getting this:



If I use the Hex value, I get the color that I was expecting:



Any idea what the difference is so I can be aware of it in the future? I've never had, or at least never noticed, any problems with RGB() before.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves566

1 Comments

Sorted by latest first Latest Oldest Best

 

@Mendez620

UPDATE: There IS a typo in your code :))

You wrote rgb(224,224,195); instead of rgb(244,224,195);



Are you sure there isn't any kind of typo in your code? Cause I could not replicate your issue:



Here, try my code and see if this comes up the same way:

.hex,
.rgb{
width:300px;
height:300px;
position:relative;
margin:0 auto;
background:#f4e0c3;
}
.rgb{
background:rgb(244, 224, 195);
}

<div class="hex">
</div>
<div class="rgb">
</div>


Anyway, whatever it is, since I could not replicate it, it must be local. Maybe browser related?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme