- Timestamp:
- 07/23/09 11:18:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/idldoc_assistant_output/Colors/getcolor.html
r338 r402 269 269 270 270 <h3>Examples</h3><pre> 271 271 272 To load a yellow color in color index 100 and plot in yellow, type: 272 273 273 274 274 IDL> yellow = GETCOLOR('yellow', 100) 275 IDL> PLOT, data, COLOR=yellow 275 276 276 277 or, 277 278 278 279 IDL> PLOT, data, COLOR=GETCOLOR('yellow', 100) 279 280 280 281 To do the same thing on a 24-bit color system with decomposed color on, type: 281 282 282 283 IDL> PLOT, data, COLOR=GETCOLOR('yellow', /TRUE) 283 284 284 285 or in IDL 5.2 and higher, 285 286 286 287 287 IDL> DEVICE, Decomposed=1 288 IDL> PLOT, data, COLOR=GETCOLOR('yellow') 288 289 289 290 To load all 16 colors into the current color table, starting at 290 291 color index 200, type: 291 292 292 293 IDL> TVLCT, GETCOLOR(), 200 293 294 294 295 To add the color names to a list widget: 295 296 296 297 IDL> listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 297 298 298 299 To load all 16 colors and have the color indices returned in a structure: 299 300 300 301 302 303 301 IDL> DEVICE, Decomposed=0 302 IDL> colors = GetColor(/Load, Start=1) 303 IDL> HELP, colors, /Structure 304 IDL> PLOT, data, COLOR=colors.yellow 304 305 305 306 To get the direct color values as 24-bit integers in color structure fields: 306 307 307 308 309 308 IDL> DEVICE, Decomposed=1 309 IDL> colors = GetColor(/Load) 310 IDL> PLOT, data, COLOR=colors.yellow 310 311 311 312 Note that the START keyword value is ignored if on a 24-bit device, … … 313 314 writing code like this: 314 315 315 316 317 318 319 316 IDL> colors = GetColor(/Load) 317 IDL> PLOT, data, Color=colors.yellow; IDL> DEVICE, Decomposed=0 318 IDL> colors = GetColor(/Load, Start=1) 319 IDL> HELP, colors, /Structure 320 IDL> PLOT, data, COLOR=colors.yellow 320 321 321 322 To get the direct color values as 24-bit integers in color structure fields: 322 323 323 324 325 324 IDL> DEVICE, Decomposed=1 325 IDL> colors = GetColor(/Load) 326 IDL> PLOT, data, COLOR=colors.yellow 326 327 327 328 Note that the START keyword value is ignored if on a 24-bit device, … … 329 330 writing code like this: 330 331 331 332 332 IDL> colors = GetColor(/Load) 333 IDL> PLOT, data, Color=colors.yellow 333 334 334 335 </pre><h3>Version history</h3> 335 336 336 337 <h4>Version</h4> 337 $Id: getcolor.pro 3 27 2007-12-13 16:22:35Z pinsard $338 $Id: getcolor.pro 371 2008-08-07 09:32:02Z pinsard $ 338 339 339 340 <h4>History</h4>
Note: See TracChangeset
for help on using the changeset viewer.