On Tue, Jun 23, 2009 at 2:26 PM, Dieter Menne
<dieter.menne@menne-biomed.de>wrote:

>
>
>
> 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")
>
>
 "8-bit color" graphics often refers to a situation where each pixel is 8
bits, and the colour comes from a 256-colour palette lookup table.

 GIF files are often 8-bit colour with a palette.

 "24-bit color" is the usual case when you have 8 bits for each of red,
green, and blue (giving 256 intensities of each). It's sometimes called
'true colour' because each pixel can be its own colour. With 8-bit graphics
systems much trickery was needed to colour things to the nearest colour in
the palette, or to switch the palette dynamically.

Barry

	[[alternative HTML version deleted]]


