Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

rgbformulae and selection of weights that appear "nice" and "natural"

916 views
Skip to first unread message

Rahul

unread,
Mar 4, 2009, 9:37:13 PM3/4/09
to
'show palette rgbformulae' always amazes me. Just looking at all the
functional forms there:

* there are 37 available rgb color mapping formulae:
0: 0 1: 0.5 2: 1
3: x 4: x^2 5: x^3
6: x^4 7: sqrt(x) 8: sqrt(sqrt(x))
9: sin(90x) 10: cos(90x) 11: |x-0.5|
12: (2x-1)^2 13: sin(180x) 14: |cos(180x)|
[snip]

A while ago Ethan had pointed me to "test palette" to get more details.
Although fascinating it is "analytic". I still wonder about the
"synthetic" aspects.

Who came up with these functional forms? Have these forms historically
changes over gnuplot versions? Were they inherited from other codes or was
it a gnuplot innovation?

Besides 'set palette rgbformulae' gives a great list

Some nice schemes in RGB color space
7,5,15 ... traditional pm3d (black-blue-red-yellow)
3,11,6 ... green-red-violet
23,28,3 ... ocean (green-blue-white); try also all other permutations
21,22,23 ... hot (black-red-yellow-white)
[snip]

Were these relative weights a gnuplot discovery or are there charts and
tables one can look at to get these?

In short, how does one decide the math functions that lead to a "pleasing"
and "natural" aspect to human eyes? Is this just an art or have the basics
been codified somewhere?

--
Rahul

James

unread,
Mar 5, 2009, 6:55:30 AM3/5/09
to
On Mar 4, 9:37 pm, Rahul <nos...@nospam.invalid> wrote:
>  'show palette rgbformulae'  always amazes me. Just looking at all the
> functional forms there:

snip

> In short, how does one decide the math functions that lead to a "pleasing"
> and "natural" aspect to human eyes? Is this just an art or have the basics
> been codified somewhere?

I found the following website useful when coding a simple FEA post-
processor. There are also links to other resources.

http://geography.uoregon.edu/datagraphics/index.htm

James

Rahul

unread,
Mar 5, 2009, 1:18:17 PM3/5/09
to
James <jajo...@parker.com> wrote in news:bbeae3d2-2d97-4784-be30-
7ef38b...@17g2000vbf.googlegroups.com:

> I found the following website useful when coding a simple FEA post-
> processor. There are also links to other resources.
>
> http://geography.uoregon.edu/datagraphics/index.htm
>
> James
>

Thanks James! The Colorbrewer is another useful tool for me to select my
palatte.

--
Rahul

Petr Mikulik

unread,
Mar 6, 2009, 7:25:32 AM3/6/09
to
> 'show palette rgbformulae' always amazes me. Just looking at all the
> functional forms there:
>
> Who came up with these functional forms? Have these forms historically
> changes over gnuplot versions? Were they inherited from other codes or was
> it a gnuplot innovation?

I have developed these formulae in my older program called pm3d in 1995,
see http://www.sci.muni.cz/~mikulik/freeware.html#pm3d.
I've used those formulae when I ported the functionality to gnuplot. We have
used them later also in the "zimg" program, zimg.sourceforge.net.

> Were these relative weights a gnuplot discovery or are there charts and
> tables one can look at to get these?

I discovered them from scratch and searched which combination leads to
a color spectrum I would enjoy.

> In short, how does one decide the math functions that lead to a "pleasing"
> and "natural" aspect to human eyes? Is this just an art or have the basics
> been codified somewhere?

Humans are different, mainly in the art aspects :-)

Nowadays, "set palette" allows many possibilities how to set/change the
mapping.

---
Petr Mikulik

Rahul

unread,
Mar 6, 2009, 12:39:00 PM3/6/09
to
Petr Mikulik <mik...@physics.muni.cz> wrote in
news:Pine.LNX.4.64.09...@monoceros.physics.muni.cz:

> I have developed these formulae in my older program called pm3d in
> 1995, see http://www.sci.muni.cz/~mikulik/freeware.html#pm3d.
> I've used those formulae when I ported the functionality to gnuplot.
> We have used them later also in the "zimg" program,
> zimg.sourceforge.net.

Thanks Petr!


>
> I discovered them from scratch and searched which combination leads to
> a color spectrum I would enjoy.

Wow. Sounds like something that deserves a publication somewhere. It does
not seem to be a trivial choice. Most choices I make end up awfully ugly.



>> In short, how does one decide the math functions that lead to a
>> "pleasing" and "natural" aspect to human eyes? Is this just an art or
>> have the basics been codified somewhere?


> Humans are different, mainly in the art aspects :-)

True. But similar too. Look at sound; most people would agree on the
definitions of "music" and "noise". Although in the frequency domain its
all the same numbers. I wonder if any analogous theories exist for colors
in the RGB domain.

For example, are some of those color choices exploiting a paradigm like:
"keep hue constant and change saturation linearly" or some such?

Or perhaps those math forms that are included in the palette are plotting
trajectories through the color space on the chromaticity diagram?

http://www.yorku.ca/eye/ciediag1.htm


--
Rahul

0 new messages