Is there any color code chart to indicate the colors used in Mayavi plotting functions?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there any color code chart to indicate the colors used in Mayavi plotting functions?

Ariman
Hi, all:

    About the 'color' keyword in the plotting functions like points3d() or plot3d(),
I know it's a triplet of float ranging from 0 to 1, eg (1, 1, 1) for white, but how
about other colors, yellow(?,?,?), blue(?,?,?), violet(?,?,?)...
Is there a color code chart to indicate the values in detail, like the HTML color codes.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any color code chart to indicate the colors used in Mayavi plotting functions?

Gael Varoquaux
On Fri, Nov 04, 2011 at 02:24:41AM -0700, Ariman wrote:
> I know it's a triplet of float ranging from 0 to 1, eg (1, 1, 1) for white,
> but how
> about other colors, yellow(?,?,?), blue(?,?,?), violet(?,?,?)...

It's an RGB color. (1, 0, 0) is red, (0, 1, 0) is green, (0, 0, 1) is
blue. If you cannot guestimate the colors, you can use the graphical user
interface to set them. Simply set them interactively using the standard
procedure to modify objects interactively:
http://github.enthought.com/mayavi/mayavi/mlab.html#changing-object-properties-interactively
and use the record mode (paragraph and link on the page I point to above)
to turn this interactive action in a color code.

HTH,

Gael
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Is there any color code chart to indicate the colors used in Mayavi plotting functions?

Ariman
Thanks for your reminding.
I never thought it was RGB colors, because I always consider the RGB color code is 0-255, like (0,0,255)is blue. Now I can transfom the code from 0-255 into 0-1, this works well.

Thank you very much!