[R] Convert RGB-sRBG
Dieter Menne
dieter.menne at menne-biomed.de
Tue Jun 23 15:26:09 CEST 2009
Paulo Cardoso wrote:
>
> How can I convert from 8-bit RGB color to [0-1] interval (sRGB) and
> vice-versa?
>
If you have the R/G/B values separately, divide by 255, and use function rgb
in grDevices. If you have the hex values, paste these into a string, and use
something like
col2rgb("#2C312C")
Dieter
--
View this message in context: http://www.nabble.com/Convert-RGB-sRBG-tp24163348p24165915.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list