- Timestamp:
- 07/23/09 11:18:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/idldoc_html_output/Colors/getcolor.html
r338 r402 298 298 299 299 <h3>Examples</h3><div class="preformat"> 300 300 301 To load a yellow color in color index 100 and plot in yellow, type: 301 302 302 303 303 IDL> yellow = GETCOLOR('yellow', 100) 304 IDL> PLOT, data, COLOR=yellow 304 305 305 306 or, 306 307 307 308 IDL> PLOT, data, COLOR=GETCOLOR('yellow', 100) 308 309 309 310 To do the same thing on a 24-bit color system with decomposed color on, type: 310 311 311 312 IDL> PLOT, data, COLOR=GETCOLOR('yellow', /TRUE) 312 313 313 314 or in IDL 5.2 and higher, 314 315 315 316 316 IDL> DEVICE, Decomposed=1 317 IDL> PLOT, data, COLOR=GETCOLOR('yellow') 317 318 318 319 To load all 16 colors into the current color table, starting at 319 320 color index 200, type: 320 321 321 322 IDL> TVLCT, GETCOLOR(), 200 322 323 323 324 To add the color names to a list widget: 324 325 325 326 IDL> listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 326 327 327 328 To load all 16 colors and have the color indices returned in a structure: 328 329 329 330 331 332 330 IDL> DEVICE, Decomposed=0 331 IDL> colors = GetColor(/Load, Start=1) 332 IDL> HELP, colors, /Structure 333 IDL> PLOT, data, COLOR=colors.yellow 333 334 334 335 To get the direct color values as 24-bit integers in color structure fields: 335 336 336 337 338 337 IDL> DEVICE, Decomposed=1 338 IDL> colors = GetColor(/Load) 339 IDL> PLOT, data, COLOR=colors.yellow 339 340 340 341 Note that the START keyword value is ignored if on a 24-bit device, … … 342 343 writing code like this: 343 344 344 345 346 347 348 345 IDL> colors = GetColor(/Load) 346 IDL> PLOT, data, Color=colors.yellow; IDL> DEVICE, Decomposed=0 347 IDL> colors = GetColor(/Load, Start=1) 348 IDL> HELP, colors, /Structure 349 IDL> PLOT, data, COLOR=colors.yellow 349 350 350 351 To get the direct color values as 24-bit integers in color structure fields: 351 352 352 353 354 353 IDL> DEVICE, Decomposed=1 354 IDL> colors = GetColor(/Load) 355 IDL> PLOT, data, COLOR=colors.yellow 355 356 356 357 Note that the START keyword value is ignored if on a 24-bit device, … … 358 359 writing code like this: 359 360 360 361 361 IDL> colors = GetColor(/Load) 362 IDL> PLOT, data, Color=colors.yellow 362 363 </div> 363 364 <h3>Version history</h3> 364 365 365 366 <h4>Version</h4><div class="preformat"> 366 $Id: getcolor.pro 3 27 2007-12-13 16:22:35Z pinsard $367 $Id: getcolor.pro 371 2008-08-07 09:32:02Z pinsard $ 367 368 </div> 368 369 <h4>History</h4><div class="preformat">
Note: See TracChangeset
for help on using the changeset viewer.