#5601: Colors: CSS3/SVG presets, construct from HSL/HSV, lighter/darker methods,
linearly combine
---------------------------+------------------------------------------------
Reporter: jason | Owner: was
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-4.3
Component: graphics | Keywords:
Work_issues: | Author: Mitesh Patel
Upstream: N/A | Reviewer: Jason Grout, Karl-Dieter Crisman
Merged: |
---------------------------+------------------------------------------------
Changes (by kcrisman):
* status: needs_review => needs_work
* reviewer: => Jason Grout, Karl-Dieter Crisman
Comment:
I just looked at this too. Overall, a great patch, and well documented
and well thought out. One quibble is whether it should be "An Red-Green-
Blue" or "A"; I know it's "An RGB", but this seems awkward. Is it
necessary for ColorMaps to inherit from collections.whatever, also?
But the downside of such a patch is that all these things are together, so
we can't give positive review to the good parts. And adding colors and
the lighter/darker do not function at all properly. In addition to
Jason's example, red+yellow=green, not orange, with this addition;
further, you can't make red lighter (to, say, pink) and making it darker
gives... brown.
So I think that all of those things should use HSV or HSL, and you can
increase or decrease S or L as seems to work best for lighter/darker, and
do a color-wheel addition of hues for addition. This is a little tricky -
because the color wheel has nontrivial fundamental group, you can't get a
unique answer for adding orange and blue, say. (There are some
interesting psych experiments where subjects shown complementary colors in
the two eyes see either a superimposition of the colors, or the colors
switching back and forth.) Oh, and what the heck does multiplying a color
by a color mean? I think that should be removed unless there is a natural
interpretation; scalar mult only, please, and that can be the RGB mult.
Anyway, I think this is all doable, but it's a shame this would hold up
the excellent refactoring and improvement of colors and colormaps. Why
not just remove the not properly working things, and keep their tickets
open, but do the base stuff here?
And as for the random doctests... Jason, I think he marked them that way
because the default colors and colormaps may change. But probably that
will just be something that should be fixed each time we upgrade
matplotlib or something.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5601#comment:33>
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].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.