pro Sky_BodyColors, $ reds, greens, blues, $ White, Black, Purple, Red, Green, $ Greyish, Yellowish, Blueish, Reddish, Greenish;+ ; NAME: ; Sky_BodyColors ; PURPOSE: ; Defines colors to be used for coloring heliospheric bodies ; CATEGORY: ; Volume rendering: SkyImage ; CALLING SEQUENCE: ; Sky_BodyColors, reds, greens, blues, $ ; White, Black, Purple, Red, Green, $ ; Greyish, Yellowish, Blueish, Reddish, Greenish ; INPUTS: ; (none) ; OUTPUTS: ; reds, greens, blues ; array[N]; type: byte; currently N=236 ; RGB color table used for coloring heliospheric objects ; (planets, etc.). ; The color table is patched together from a number of IDL ; color tables. The file skycolor.pro describes the color table ; Black : 0 1 ; White : 2 3 ; Purple : 4 5 ; Red : 6 7 ; Green : 8 9 ; Blue : 10 11 ; Earth : 12 15 ; Greyish : 16 59 ; Blueish : 60 103 ; Yellowish: 104 147 ; Reddish : 148 191 ; Greenish : 192 235 ; Each of these entries is returned as a two-element argument. ; ; White, Black, Purple, Red, Green ;. Greyish, Yellowish, Blueish, Reddish, Greenish ; array[2]; type: integer ; indices into the color arrays 'reds','green','blues' for ; beginning and start color ; CALLS: ; flt_read, filepath ; INCLUDE: ; @skycolors.pro ; SIDE EFFECTS: ; Needs files $SYS:skyinfo.txt and $SYS:skyrgb.txt, storing the color table information ; RESTRICTIONS: ; PROCEDURE: ; Currently the number of elements is restricte to 236 colors to make things work ; on Windows NT. ; MODIFICATION HISTORY: ; JUN-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; Split off from old skycolors.pro (now obsolete) ;- on_error, 2 ; On error, return to caller @skycolors.pro ; Dummy comment for Linux ; Read color tables from file if not flt_read(filepath(root=getenv('SYS'),'skyinfo.txt'),S,crumbs=Crumbs, $ /silent,error=error) then message, 'No color information available: '+error Black = fix( S(*, where(Crumbs eq cBlack )) ) White = fix( S(*, where(Crumbs eq cWhite )) ) Purple = fix( S(*, where(Crumbs eq cPurple)) ) Red = fix( S(*, where(Crumbs eq cRed )) ) Green = fix( S(*, where(Crumbs eq cGreen )) ) Greyish = fix( S(*, where(Crumbs eq cTables[iGreyish ])) ) Yellowish = fix( S(*, where(Crumbs eq cTables[iYellowish])) ) Blueish = fix( S(*, where(Crumbs eq cTables[iBlueish ])) ) Reddish = fix( S(*, where(Crumbs eq cTables[iReddish ])) ) Greenish = fix( S(*, where(Crumbs eq cTables[iGreenish ])) ) iColr = fix( S(*, where(Crumbs eq cColors)) ) if not flt_read(filepath(root=getenv('SYS'),'skyrgb.txt'),S, $ /silent,error=errror) then message, 'No color information available: '+error S = transpose( byte(S) ) ; Color table available for coloring heliospheric bodies reds = S(iColr[0]:iColr[1],0) greens = S(iColr[0]:iColr[1],1) blues = S(iColr[0]:iColr[1],2) return & end