Last change
on this file since 295 was
163,
checked in by navarro, 18 years ago
|
header improvements : type of parameters and keywords, default values, spell checking + idldoc assistant (IDL online_help)
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
668 bytes
|
Line | |
---|
1 | ;+ |
---|
2 | ; @file_comments |
---|
3 | ; Clarify the current palette playing with brightness |
---|
4 | ; |
---|
5 | ; @param COEF {in}{required} The rule of attenuation of colors divide by 2 the brightness by default |
---|
6 | ; |
---|
7 | ; @param RED |
---|
8 | ; |
---|
9 | ; @param GREEN |
---|
10 | ; |
---|
11 | ; @param BLUE |
---|
12 | ; |
---|
13 | ; @todo Seb: compléter param red/green/blue |
---|
14 | ;- |
---|
15 | PRO palit, coef, red, green, blue |
---|
16 | ; |
---|
17 | compile_opt idl2, strictarrsubs |
---|
18 | ; |
---|
19 | IF n_elements(coef) EQ 0 THEN coef = 0.5 |
---|
20 | IF n_elements(red) EQ 0 THEN tvlct, red, green, blue, /get |
---|
21 | color_convert, red, green, blue, h, l, s, /rgb_hls |
---|
22 | l = 1.-coef*(1.-l) |
---|
23 | ; |
---|
24 | ; Black must stay really black! |
---|
25 | ; Each palette starts by Black and ends by white |
---|
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.