What RGB color is this? (quick Q)
Stéfan van der Walt
stefan at sun.ac.za
Tue Dec 31 06:15:04 EST 2013
Hi Adam
On Mon, 30 Dec 2013 22:37:43 -0800, Adam Hughes wrote:
> I noticed recently that matplotlib.colors limits RGB values to a range (0 -
> 1), while in scikit image, RGB values can be much larger. For example:
>
> *test = np.zeros( (500,500,3) )*
>
> *test[:,:,0]=50*
> *test[:,:,1]=19*
> *test[:,:,2]=25*
>
> *imshow(test); *
>
> Produces a teal background. I was curious how the color teal is derived
> from this? I tried normalizing to 255 and and 50 but neither seemed to
> produce the same teal color.
Here's a write-up of the data-type and range representation that scikit-image
uses:
http://scikit-image.org/docs/0.9.x/user_guide/data_types.html
When visualizing data with Matplotlib, note that data is normalized by
default, so you have to specify "vmin" and "vmax" to correctly display your
generated background.
Regards
St�fan
More information about the scikit-image
mailing list