#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
Upstream: N/A | Reviewer:
Merged: |
---------------------------+------------------------------------------------
Comment(by mpatel):
Version 6:
* Makes it possible to scalar add and multiply Sage `Color`s (cf.
#5604.). The RGB coordinates are reduced modulo 1.0 after each operation
--- watch the order! The `scale` and `lighter` methods simply cap values
at 1.0. For the sake of clarity: Adding colors does not take the
arithmetic mean of their corresponding components.
* Uses Sage `Color`s, instead of 3-tuples, for the values in
`sage.plot.colors.colors`. This is for the sake of uniformity and seems
to make sense. Later, we could extend the class from RGB to RGBA. I
added `__iter__` and `__getitem__` methods, so that doctests under `plot/`
pass, but please report any problems!
On primary, secondary, tertiary, and quaternary colors, see, e.g.,
[http://members.cox.net/sn3nut/color%20theory.htm this],
[http://en.wikipedia.org/wiki/Tertiary_color this], or
[http://books.google.com/books?id=oFmoFNx-
pDwC&pg=PA24&lpg=PA24&dq=quaternary+color+tertiary&source=bl&ots=Dnu8NaVDAD&sig=O6AWEkn9FLnf6pLWKT1a96DhcFU&hl=en&ei=yuIXS5HTOIngsQPWya2ZDg&sa=X&oi=book_result&ct=result&resnum=4&ved=0CBAQ6AEwAw#v=onepage&q=quaternary%20color%20tertiary&f=false
this].
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5601#comment:27>
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.