Useful routines for color space calculations

View: New views
2 Messages — Rating Filter:   Alert me  

Useful routines for color space calculations

by Daniel Scott Matthews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

See http://www.ncl.ucar.edu/Document/Functions/color.shtml

The application above is open source so the code can be used for
reference and some of those functions would be useful in K-3D.

In particular the color space conversions RGB2HLS and HLS2RGB

With the color space conversions it is possible to have objects retain
colors that relate to each other while changing over time or in
relation to changes in some other property in the scene.

A GUI use would be to have the point, edge and face painters colors
hue shifted yet related so that you can see selections better. e.g.
Point is Red, edge is shifted toward Blue and Face toward Yellow, just
enough so that where you have a complex selection set you can still
see the edges and points amongst the faces.

e.g.
Edge.Color = HueShift(Point.Color, -50)
Face.Color = HueShift(Point.Color, 50)

A few other basic operators such as luminance darker/lighter,
Saturation duller/brighter would add to the Hue rotate cold/warm


There are routines for color relations, harmonies here
http://extensions.services.openoffice.org/project/colorpalettes

Color Harmony (Complement, Split Complement, Triad, Clash, Tetrad
Symmetric, Tetrad Double Complement, Tetrad Complement, Pentagon,
Analogous Variation, Analogous)

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: Useful routines for color space calculations

by Daniel Scott Matthews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Oct 18, 2009 at 7:31 AM, Daniel Scott Matthews
<dsmatthews@...> wrote:

> See http://www.ncl.ucar.edu/Document/Functions/color.shtml
>
> The application above is open source so the code can be used for
> reference and some of those functions would be useful in K-3D.
>
> In particular the color space conversions RGB2HLS and HLS2RGB
>
> With the color space conversions it is possible to have objects retain
> colors that relate to each other while changing over time or in
> relation to changes in some other property in the scene.
>
> A GUI use would be to have the point, edge and face painters colors
> hue shifted yet related so that you can see selections better. e.g.
> Point is Red, edge is shifted toward Blue and Face toward Yellow, just
> enough so that where you have a complex selection set you can still
> see the edges and points amongst the faces.
>
> e.g.
> Edge.Color = HueShift(Point.Color, -50)
> Face.Color = HueShift(Point.Color, 50)
>
> A few other basic operators such as luminance darker/lighter,
> Saturation duller/brighter would add to the Hue rotate cold/warm
>
>
> There are routines for color relations, harmonies here
> http://extensions.services.openoffice.org/project/colorpalettes
>
> Color Harmony (Complement, Split Complement, Triad, Clash, Tetrad
> Symmetric, Tetrad Double Complement, Tetrad Complement, Pentagon,
> Analogous Variation, Analogous)
>

Correction the oo URL has pre-calulated color harmony sets, not code.
I will continue to look for the formulas.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development