Last change
on this file since 134 was
134,
checked in by navarro, 18 years ago
|
change *.pro file properties (del eof-style, del executable, set keywords Id
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
668 bytes
|
Rev | Line | |
---|
[2] | 1 | ;+ |
---|
[133] | 2 | ; @file_comments |
---|
| 3 | ; Clarify the current palette playing with brightness |
---|
[2] | 4 | ; |
---|
[133] | 5 | ; @param coef {in}{required} The rule of attenuation of colors divide by 2 the brightness by default |
---|
[2] | 6 | ; |
---|
[133] | 7 | ; @param red |
---|
| 8 | ; |
---|
| 9 | ; @param green |
---|
| 10 | ; |
---|
| 11 | ; @param blue |
---|
| 12 | ; |
---|
| 13 | ; @todo Seb: compléter param red/green/blue |
---|
[2] | 14 | ;- |
---|
[97] | 15 | PRO palit, coef, red, green, blue |
---|
[114] | 16 | ; |
---|
| 17 | compile_opt idl2, strictarrsubs |
---|
| 18 | ; |
---|
[2] | 19 | IF n_elements(coef) EQ 0 THEN coef = 0.5 |
---|
[19] | 20 | IF n_elements(red) EQ 0 THEN tvlct, red, green, blue, /get |
---|
| 21 | color_convert, red, green, blue, h, l, s, /rgb_hls |
---|
[2] | 22 | l = 1.-coef*(1.-l) |
---|
| 23 | ; |
---|
[133] | 24 | ; Black must stay really black! |
---|
| 25 | ; Each palette starts by Black and ends by white |
---|
[2] | 26 | ; |
---|
| 27 | l[0] = 0. |
---|
| 28 | tvlct, h, l, s, /hls |
---|
| 29 | return |
---|
| 30 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.