Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205449

Convert sRGB to Lab with convertColor?

$
0
0

I'm trying to work with Lab colour, and need to do conversions from sRGB, ideally with R. I've just given convertColor package a go, and am a little confused. As a test, I'm converting the Macbeth ColorChecker swatches, but am not getting exactly the right values.

Example:

swatch1sRGB <- c(115,82,68)/255
swatch1Lab <- convertColor(swatch1sRGB, from="sRGB", to="Lab")
swatch1Lab
            L      a.x        b
[1,] 38.05293 11.86536 13.71442

Which is off the real values (37.986, 13.555, 14.059) by a reasonable margin of Macbeth ColorChecker values.


Viewing all articles
Browse latest Browse all 205449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>