#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: |
---------------------------+------------------------------------------------
Comment(by jason):
According to http://stackoverflow.com/questions/398224/how-to-mix-colors-
naturally-with-c/398268#398268, we really want to work in Lab space to mix
colors, because then linear changes become linear changes in perception
(i.e., Lab is designed so that it is easy to change the perception by a
certain amount).
Also, here's some results using alpha values:
http://stackoverflow.com/questions/726549/algorithm-for-additive-color-
mixing-for-rgb-values
For lightening or darkening, some suggestions here are to convert to hsl
or hsv and modify the correct component:
http://stackoverflow.com/questions/97646/how-do-i-determine-darker-or-
lighter-color-variant-of-a-given-color
So, as always, it is not as easy as it appears at all. However, it looks
like it might be easy to convert to hsl or hsv for the darker/lighter
commands pretty easily, especially since we already have functions to do
that.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5601#comment:38>
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.