Changeset 114 for trunk/SRC/ToBeReviewed/COULEURS/getcolor.pro
- Timestamp:
- 06/19/06 16:14:56 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/COULEURS/getcolor.pro
r19 r114 181 181 182 182 FUNCTION COLOR24, number 183 ; 184 compile_opt idl2, strictarrsubs 185 ; 183 186 184 187 ; This FUNCTION accepts a [red, green, blue] triple that … … 204 207 num24bit = 0L 205 208 206 FOR j=0,2 DO num24bit = num24bit + ((number (j) MOD 16) * base16(0,j)) + $207 (Fix(number (j)/16) * base16(1,j))209 FOR j=0,2 DO num24bit = num24bit + ((number[j] MOD 16) * base16[0,j]) + $ 210 (Fix(number[j]/16) * base16[1,j]) 208 211 209 212 RETURN, num24bit … … 214 217 FUNCTION GETCOLOR, thisColor, index, TRUE=truecolor, $ 215 218 NAMES=colornames, LOAD=load, START=start 219 ; 220 compile_opt idl2, strictarrsubs 221 ; 216 222 217 223 ; Set up the color vectors. … … 315 321 316 322 varInfo = SIZE(thisColor) 317 IF varInfo (varInfo(0) + 1)NE 7 THEN $323 IF varInfo[varInfo[0] + 1] NE 7 THEN $ 318 324 MESSAGE, 'The color name must be a string.' 319 325 thisColor = STRUPCASE(thisColor) … … 326 332 ; set the index to a YELLOW color, and continue. 327 333 328 IF colorIndex (0)LT 0 THEN BEGIN334 IF colorIndex[0] LT 0 THEN BEGIN 329 335 MESSAGE, "Can't find color. Returning YELLOW.", /INFORMATIONAL 330 336 colorIndex = 3 … … 333 339 ; Get the color triple. 334 340 335 r = rvalue (colorIndex)336 g = gvalue (colorIndex)337 b = bvalue (colorIndex)341 r = rvalue[colorIndex] 342 g = gvalue[colorIndex] 343 b = bvalue[colorIndex] 338 344 returnColor = REFORM([r, g, b], 1, 3) 339 345
Note: See TracChangeset
for help on using the changeset viewer.