[Thread Prev][Thread Next][Index]
Re: [ferret_users]RGB values for interlevels
Hi Peter,
| I would like to know the algorythm of palette making or something
| else that helps to be able to use the same palette and scale in
| other applications? If I use "N" levels during plotting and i want
| to use for example inverse_bluescale, how will i know the RGB values
| (in percent or in values from 0...255) for the interlevels (2.,
| 3. ,..., N-1.) ?
|
| inverse_bluescale:
| 0 95 95 95 !1. level
| 100 0 0 95 !N. level
I recommend that you start from Chapter 6, Section 5.2, of the Ferret
User's Guide:
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/customizing-plots/COLOR/
I think that Ferret linearly interpolates the RGB values: you can
regard a set of RGB values as a 3D vector (r,g,b) and the
interpolation is to find a point on the line segment connecting
the two end points, (r1,g1,b1) and (r2,g2,b2).
So, for example, a 20% value should correspond to
(95, 95, 95) + (0-95, 0-95, 95-95) * 0.2
= (76, 76, 95)
By the way, if you want specify a correspondence between a level and a
color, you might want to use the "RGB_Mapping By_level" option. (See
the manual.)
Hope this helps,
Ryo
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement