#5601: predefine colors in Sage
---------------------------+------------------------------------------------
Reporter: jason | Owner: was
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-4.3
Component: graphics | Keywords:
Work_issues: | Author: Mitesh Patel
Reviewer: | Merged:
---------------------------+------------------------------------------------
Comment(by jason):
Replying to [comment:8 mpatel]:
>
> Almost. See
[http://en.wikipedia.org/wiki/X11_color_names#Color_names_that_clash_between_X11_and_HTML.2FCSS
this].
Interesting--I didn't know that HTML green was not #00FF00
>
> > We should also have several lists of colors (like the predefined cmaps
in matplotlib) that go well together, so you can do
> >
> > colors.winter[0]
> >
> > colors.winter[1]
> >
> > etc. for a nice set of colors that go well together.
>
> Oops! I haven't done this. Which of matplotlib's
[http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps color maps]
should we use?
>
> {{{
> #!python
> from matplotlib import cm
> summer = []
> for i in xrange(cm.summer.N):
> summer.append(tuple(cm.summer(i)[0:3]))
> }}}
>
> `N = 256` for all of them. Should we make our lists the same length?
How much do we want to invent/wrap things versus just using their classes
directly? Maybe we should just import their colormaps into our color
namespace, so people just have to remember colors.winter, rather than
having to import matplotlib?
A *really* cool thing we could do with the gradients, though, is somehow
helping people pick gradients according to the criteria here:
http://colorbrewer2.org/
(note that lots of the matplotlib color maps came from that website).
Note that on that website, you can easily pick gradients that are color-
blind safe, that are safe for photocopying, that are print-friendly, etc.
It would be really cool to have basically the functionality of that flash
applet at a user's disposal in Sage. So, for example:
colors.gradients(num_colors=5,color_blind=True,print_friendly=True)
would return a dictionary of gradients that satisfy the criteria (like
clicking the boxes on that flash applet). Additionally, we should
incorporate the recommendations from the phd thesis studying the color-
blind aspects of the schemes---see p. 87 of
http://www.personal.psu.edu/cab38/ColorBrewer/Steve_Gardner_thesis_PSU.pdf
That said, what I describe above is probably work for another ticket
(unless you want to take it on in this patch!)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5601#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=.