source: trunk/SRC/ToBeReviewed/COULEURS/palit.pro @ 226

Last change on this file since 226 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
RevLine 
[2]1;+
[133]2; @file_comments
3; Clarify the current palette playing with brightness
[2]4;
[163]5; @param COEF {in}{required} The rule of attenuation of colors divide by 2 the brightness by default
[2]6;
[163]7; @param RED
[133]8;
[163]9; @param GREEN
[133]10;
[163]11; @param BLUE
[133]12;
13; @todo Seb: compléter param red/green/blue
[2]14;-
[97]15PRO 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
30END
Note: See TracBrowser for help on using the repository browser.