- Timestamp:
- 09/06/06 12:46:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/COULEURS/getcolor.html
r163 r168 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">4 5 <!-- Generated by IDLdoc 2.0 -->6 7 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">8 <head>9 <title>getcolor.pro (SAXO Documentation)</title>10 11 12 <style type="text/css" media="all">13 14 /* CSS for all files which appear in the "main" viewing area: overview,15 directory overviews, warnings, index, search, pro files, source16 code, help, and etc files. */17 18 /* Link styles --------------------------------------------------------------- */19 20 a { text-decoration: none; }21 22 a:link, a:visited {23 color: #660000;24 border-bottom: 1px dotted #C0C0F0;25 }26 27 a:hover, a:focus {28 color: #993333;29 background: #FFFFCC;30 border-bottom: 1px dotted #303099;31 }32 33 34 /* Main styles --------------------------------------------------------------- */35 p.preformat {36 font-family: Courier;37 }38 p.preformat {39 font-family: Courier;40 }41 p.preformat {42 font-family: Courier;43 }44 p.preformat {45 font-family: Courier;46 }47 p.preformat {48 font-family: Courier;49 }50 p.preformat {51 font-family: Courier;52 }53 p.preformat {54 font-family: Courier;55 }56 p.preformat {57 font-family: Courier;58 }59 p.preformat {60 font-family: Courier;61 }62 p.preformat {63 font-family: Courier;64 }65 p.preformat {66 font-family: Courier;67 }68 p.preformat {69 font-family: Courier;70 }71 p.preformat {72 font-family: Courier;73 }74 p.preformat {75 font-family: Courier;76 }77 p.preformat {78 font-family: Courier;79 }80 p.preformat {81 font-family: Courier;82 }83 p.preformat {84 font-family: Courier;85 }86 p.preformat {87 font-family: Courier;88 }89 p.preformat {90 font-family: Courier;91 }92 p.preformat {93 font-family: Courier;94 }95 p.preformat {96 font-family: Courier;97 }98 p.preformat {99 font-family: Courier;100 }101 p.preformat {102 font-family: Courier;103 }104 p.preformat {105 font-family: Courier;106 }107 p.preformat {108 font-family: Courier;109 }110 p.preformat {111 font-family: Courier;112 }113 p.preformat {114 font-family: Courier;115 }116 p.preformat {117 font-family: Courier;118 }119 p.preformat {120 font-family: Courier;121 }122 p.preformat {123 font-family: Courier;124 }125 p.preformat {126 font-family: Courier;127 }128 p.preformat {129 font-family: Courier;130 }131 p.preformat {132 font-family: Courier;133 }134 p.preformat {135 font-family: Courier;136 }137 p.preformat {138 font-family: Courier;139 }140 p.preformat {141 font-family: Courier;142 }143 p.preformat {144 font-family: Courier;145 }146 p.preformat {147 font-family: Courier;148 }149 p.preformat {150 font-family: Courier;151 }152 p.preformat {153 font-family: Courier;154 }155 p.preformat {156 font-family: Courier;157 }158 p.preformat {159 font-family: Courier;160 }161 p.preformat {162 font-family: Courier;163 }164 p.preformat {165 font-family: Courier;166 }167 168 body {169 margin: 0;170 padding: 0;171 font-size: 10pt;172 font-family: Verdana, Helvetica, Arial, sans-serif;173 background-color: #FFFFFF;174 }175 176 p {177 margin-top: 0.5em;178 margin-bottom: 0;179 }180 181 #container { margin: 1em; }182 183 code.section { white-space: pre; }184 185 pre.snippet {186 margin-left: 5%;187 background: #F0F0F0;188 border: 1px dashed #999999;189 width: 43em;190 padding: 0.5em 0.5em 0.5em 0.5em;191 white-space: pre;192 }193 194 /* Navbar styles ------------------------------------------------------------- */195 196 #navbar_title {197 color: #000033;198 background-color: #F0F0FF;199 font-family: Arial, Helvetica, sans-serif;200 padding: 20px 30px;201 border-bottom: 1px solid #000033;202 }203 204 #navbar_title * {205 margin: 0;206 padding: 0;207 }208 209 #navbar_title h1 {210 letter-spacing: 0.1em;211 font-variant: small-caps;212 font-size: 250%;213 text-indent: -1em;214 padding-left: 1em;215 }216 217 #navbar_title h2 {218 font-size: 110%;219 font-weight: normal;220 color: #333399;221 }222 223 #main_navbar table {224 width: 100%;225 border-bottom: 1px solid #666699;226 }227 228 #main_navbar td {229 background: #CCCCFF;230 font-size: 80%;231 font-weight: bold;232 font-family: Arial, Helvetica, sans-serif;233 border-top: 3px solid #CCCCFF;234 border-bottom: 3px solid #CCCCFF;235 padding-left: 6px;236 padding-right: 6px;237 margin: 0;238 }239 240 #main_navbar td#selected {241 background: #CCCCFF;242 font-size: 80%;243 font-weight: bold;244 font-family: Arial, Helvetica, sans-serif;245 border-top: 3px solid #333399;246 border-bottom: 3px solid #CCCCFF;247 padding-left: 6px;248 padding-right: 6px;249 margin: 0;250 }251 252 #main_navbar td#flexible {253 width: 100%;254 text-align: right;255 padding-right: 1em;256 background: #CCCCFF;257 font-size: 70%;258 font-weight: normal;259 font-family: Arial, Helvetica, sans-serif;260 text-transform: uppercase;261 border-top: 3px solid #CCCCFF;262 border-bottom: 3px solid #CCCCFF;263 }264 265 #main_navbar a:link, #main_navbar a:visited { color: #660000; border: 0; }266 267 #main_navbar a:hover, #main_navbar a:focus {268 color: #FFFF66;269 background: #CCCCFF;270 border-bottom: 1px none #606099;271 border: 0;272 }273 274 #secondary_navbar {275 font-size: 80%;276 font-weight: normal;277 font-family: Arial, Helvetica, sans-serif;278 margin-top: 4px;279 margin-left: 20px;280 white-space: nowrap;281 }282 283 284 /* Tagline and footer styles ------------------------------------------------- */285 286 div#tagline {287 margin-top: 6px;288 border-top: 1px dotted lightsteelblue;289 padding-top: 6px;290 font-size: 66%;291 font-style: italic;292 }293 294 div#footer {295 margin-top: 6px;296 border-top: 1px dotted lightsteelblue;297 padding-top: 6px;298 font-size: 66%;299 font-style: italic;300 }301 302 /* Basic data presenation styles -------------------------------------------- */303 304 .index_letter {305 font-size: 300%;306 font-weight: bold;307 color: #000066;308 margin: 0.5em 0 0 -0.1em;309 }310 311 h1, h2, h3, h4 {312 font-weight: normal;313 color: #3333CC;314 }315 316 h1 {317 padding-top: 0.75em;318 font-size: 160%;319 }320 321 h2 {322 padding-top: 1em;323 font-size: 120%;324 }325 326 h3 {327 padding-top: 0.75em;328 margin-bottom: 0.25em;329 font-size: 100%;330 }331 332 h4 {333 padding: 0;334 margin: 0.5em 0 0 0;335 font-size: 80%;336 }337 338 table.basic {339 empty-cells: show;340 margin: 1.5em 1em 0 1em;341 border: 1px dotted #CFCFFF;342 font-size: 80%;343 }344 345 table.basic th {346 background-color: #F0F0FF;347 font-weight: bold;348 text-align: left;349 padding: 4px 1em 4px 4px;350 border-bottom: 1px dotted #666699;351 }352 353 table.basic td {354 vertical-align: top;355 padding: 4px 1em 4px 4px;356 }357 358 dd {359 margin-bottom: 0.25em;360 font-size: 80%;361 }362 363 364 /* Warnings styles ----------------------------------------------------------- */365 366 367 #todo dl, #bugs dl {368 margin: 0 0 0 1.5em;369 font-size: 80%;370 }371 372 #todo dd, #bugs dd {373 margin-left: 3em;374 font-size: 100%;375 }376 377 #undoc table, #obsolete table, #statistics table {378 width: 80%;379 margin-left: 2em;380 }381 382 #undoc td, #obsolete td, #statistics td {383 padding: 0 0 0 0;384 font-size: 80%;385 white-space: nowrap;386 }387 388 #undoc td.docroutine, #obsolete td.obsroutine, #statistics td.statroutine { width: 50%; }389 390 #undoc td.docstat, #statistics td.stat {391 width: 50%;392 text-align: right;393 }394 395 #undoc td.partialdoc, #statistics td.caution { color: #CC6600; }396 397 #undoc td.notdoc, #statistics td.warning { color: #993333; }398 399 /* File + routine styles ----------------------------------------------------- */400 401 h1.directory {402 padding: 1em 0 0 0;403 margin: 0;404 font-size: 66%;405 }406 407 h1.directory a { border-bottom: 0; }408 409 h2.pro_file {410 padding: 0;411 margin: 0;412 font-size: 140%;413 }414 415 div#file_attr {416 padding: 0 1em 0 1em;417 margin: 1em;418 background: #F6F6F6;419 border: 1px dotted #999999;420 }421 422 div#file_attr dt {423 font-size: 80%;424 font-weight: bold;425 }426 427 div#file_attr dd {428 font-size: 80%;429 }430 431 div#class_diagram {432 padding: 1em 0 1em 0;433 white-space: pre;434 font-family: 'Courier New';435 }436 437 table#sav_attr {438 font-size: 90%;439 margin: 1em;440 padding: 1em 1em 1em 1em;441 background: #F6F6F6;442 border: 1px dotted #999999;443 }444 445 table#sav_attr th { text-align: left; }446 447 table#sav_attr td { vertical-align: top; padding-right: 2em; }448 449 table#sav_attr td.value { width: 20em; padding-right: 0em; font-style: italic; }450 451 p.sav_warning { margin-left: 4em; font-family: 80%; }452 453 table.variables {454 font-family: 'Courier New', monospace;455 font-size: 80%;456 text-indent: -2em;457 padding-left: 2em;458 }459 460 table.variables td.image { width: 64px; }461 462 div#file_comments { white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre;463 margin: 2em;464 font-size: 80%;465 }466 467 468 div.field_summary {469 padding: 0 1em 0 1em;470 margin: 1em;471 background: #FFFFF0;472 border: 1px dotted #C0C000;473 }474 475 div#routine_summary {476 padding: 0 1em 0 1em;477 margin: 1em;478 background: #F0F0FF;479 border: 1px dotted #9999FF;480 }481 482 div.field_summary h2, div#routine_summary h2 {483 padding: 0.5em 0 0 0;484 margin: 0;485 }486 487 div.field_summary table, div.field_summary p {488 margin: 1em 1em;489 }490 491 div.field_summary td.name {492 vertical-align: top;493 padding-bottom: 0.25em;494 color: #3333CC;495 }496 497 div.field_summary span.field_type {498 font-weight: normal;499 font-size: 80%;500 color: black;501 }502 503 div.field_summary td.comments {504 vertical-align: top;505 padding-left: 2em;506 font-size: 80%;507 }508 509 p.commaList {510 margin: 1em 1em 1em 1em;511 }512 513 span.warning {514 color: #CC6633;515 font-weight: bold;516 font-size: 66%;517 text-transform: uppercase;518 }519 520 span.categories {521 color: #006633;522 font-weight: bold;523 font-size: 66%;524 text-transform: uppercase;525 }526 527 span.undoc {528 color: #FF6633;529 font-weight: bold;530 font-size: 80%;531 text-transform: uppercase;532 }533 534 span.attr {535 color: #006633;536 font-weight: bold;537 font-size: 80%;538 text-transform: uppercase;539 }540 541 span.value {542 color: #006633;543 font-weight: normal;544 text-transform: none;545 }546 547 a.top {548 font-weight: bold;549 font-size: 66%;550 text-transform: uppercase;551 float: right;552 }553 554 span.result {555 font-family: Verdana, Arial, Helvetica, sans-serif;556 font-style: italic;557 font-size: 80%;558 }559 560 div#routine_summary p, div.routine_details p.header {561 padding-top: 0.5em;562 margin-left: 1.5em;563 text-indent: -1.5em;564 font-family: 'Courier New', monospace;565 }566 567 div.routine_details {568 padding: 0.5em 1em 0.5em 1em;569 margin: 1em;570 border: 1px dotted #CCCCCC;571 }572 573 div.routine_details h2 {574 padding-top: 0;575 margin-top: 0;576 }577 578 div.routine_details div.value {579 margin: 0 1em 0 1em;580 font-size: 80%;581 }582 583 div.routine_details div.comments {584 font-size: 80%;585 margin: 0.75em 1em 1em 1em;586 }587 588 div.routine_details div.preformat {589 white-space: pre;590 }591 592 table.statistics {593 font-size: 80%;594 margin-left: 1em;595 }596 597 table.statistics td {598 padding: 0 2em 0 0;599 }600 601 /* Overview styles ----------------------------------------------------------- */602 603 div.overview {604 width: 100%;605 margin-top: 1em;606 clear: both;607 }608 609 div.overview table {610 empty-cells: show;611 font-size: 90%;612 margin: 1em 1em 1em 1em;613 padding: 1em 0.5em 1em 0.5em;614 background: #F6F6F6;615 border: 1px dotted #999999;616 }617 618 div.overview td {619 padding: 3px 1em 3px 1em;620 }621 622 div.overview td.dir {623 width: 1%;624 vertical-align: top;625 text-align: right;626 padding-right: 1em;627 }628 629 630 /* Navigation list styles for tree structures -------------------------------- */631 632 #tree {633 text-align: left;634 font-size: 90%;635 margin: 0.75em 0 0.75em 0;636 padding: 0;637 }638 639 #tree ul {640 text-align: left;641 margin: 0;642 padding: 0;643 }644 645 #tree li {646 margin: 0 0 0 15px;647 padding: 0;648 list-style-type: none;649 }650 651 #tree .symbols {652 float: left;653 width: 12px;654 height: 1em;655 padding-left: 4px;656 background-position: 0 100%;657 background-repeat: no-repeat;658 }659 660 /* Search styles ------------------------------------------------------------- */661 662 input.writein {663 padding-left: 0.5em;664 border: 1px solid #CCCCCC;665 font-family: 'Courier New';666 background: #FFFFF3;667 }668 669 #search form {670 margin-left: 2em;671 }672 673 #search table {674 margin: 1em 1em 0 2em;675 padding: 1em 2em 1em 2em;676 background: #F6F6F6;677 border: 1px dotted #999999;678 }679 680 #search tr {681 text-align: center;682 }683 684 #search td {685 font-size: 80%;686 text-align: left;687 }688 689 #search td * {690 vertical-align: middle;691 }692 693 #search p {694 font-size: 66%;695 margin: 0 3em 2em 3em;696 }697 698 /* Help styles --------------------------------------------------------------- */699 700 div.toc {701 padding: 0 1em 0 1em;702 margin: 1em;703 background: #F0F0FF;704 border: 1px dotted #9999FF;705 width: 19em;706 }707 708 div.right {709 float: right;710 width: 22em;711 }712 713 ol.toc {714 list-style-type: upper-roman;715 }716 717 ol.toc ol {718 padding-left: 3em;719 margin-left: 0;720 list-style-type: lower-alpha;721 }722 723 dl.variables dt { font-size: 80%; }724 dl.variables dd { margin-bottom: 0.5em; }725 726 </style>727 <style type="text/css" media="print">728 #navbar_title {729 background-color: #FFFFFF;730 }731 732 #main_navbar td {733 background: #FFFFFF;734 border-top: 0.25em solid #FFFFFF;735 border-bottom: 0.25em solid #FFFFFF;736 }737 738 #main_navbar td#selected {739 background: #FFFFFF;740 border-top: 0.25em solid #333399;741 border-bottom: 0.25em solid #FFFFFF;742 }743 744 #main_navbar td#flexible {745 background: #FFFFFF;746 border-top: 0.25em solid #FFFFFF;747 border-bottom: 0.25em solid #FFFFFF;748 }749 750 #secondary_navbar {751 display: none;752 }753 754 </style>755 756 757 <script type="text/javascript">758 function setTitle() {759 parent.document.title="getcolor.pro (SAXO Documentation)";760 }761 </script>762 </head>763 764 <body onload="setTitle();">765 766 <div id="navbar_title">767 <h1>SAXO Documentation</h1>768 </div>769 770 771 <div id="main_navbar">772 773 <table cellspacing="0">774 <tr>775 776 <td><a href="./../../overview.html?format=raw" title="Overview of library">Overview</a></td>777 778 779 780 <td >Directory</td>781 782 783 784 <td><a href="./../../idldoc-categories.html?format=raw" title="Browse library by category">Categories</a></td>785 786 787 788 <td><a href="./../../idldoc-index.html?format=raw" title="Index of files, routines, and parameters">Index</a></td>789 790 791 792 <td><a href="./../../search-page.html?format=raw" title="Search library">Search</a></td>793 794 795 <td id="selected">File</td>796 797 798 <td >Source</td>799 800 801 802 <td><a href="./../../idldoc-help.html?format=raw" title="Help on IDLdoc">Help</a></td>803 804 805 <td >Etc</td>806 807 <td id="flexible">Developer documentation</td>808 </tr>809 </table>810 811 </div>812 813 <div id="secondary_navbar">814 815 <a href="colorbar.html?format=raw"><<prev file</a> | <a href="lct.html?format=raw">next file >></a> <a href="getcolor.html?format=raw" target="_TOP">view single page</a> | <a href="./../../index.html?format=raw" target="_TOP">view frames</a> summary: fields | <a href="#routine_summary">routine</a> details: <a href="#routine_details">routine</a>816 817 </div>818 819 820 <div id="container">821 822 <h1 class="directory"><a href="directory-overview.html?format=raw">ToBeReviewed/COULEURS/</a></h1>823 <h2 class="pro_file">getcolor.pro</h2>824 825 <div id="file_attr">826 <dl>827 </dl>828 </div>829 830 <div id="file_comments"></div>831 832 833 834 835 836 837 838 839 <div id="routine_summary">840 <h2>Routine summary</h2>841 842 <dl>843 844 <dt><p><a href="#_COLOR24"><span class="result">result = </span>COLOR24(<span class="result">number</span>)</a></p><dt>845 <dd> NAME: GETCOLOR PURPOSE: The original purpose of this function was to enable the user to specify one of the 16 colors supported by the McIDAS color map by name.</dd>846 847 <dt><p><a href="#_GETCOLOR"><span class="result">result = </span>GETCOLOR(<span class="result">thisColor, index</span>, TRUE=<span class="result">TRUE</span>, NAMES=<span class="result">NAMES</span>, LOAD=<span class="result">LOAD</span>, START=<span class="result">START</span>)</a></p><dt>848 <dd></dd>849 850 </dl>851 </div>852 853 854 <div id="routine_details">855 856 857 <div class="routine_details" id="_COLOR24">858 859 <h2><a class="top" href="#container">top</a>COLOR24 </h2>860 861 <p class="header">862 <span class="result">result = </span>COLOR24(<span class="result"><a href="#_COLOR24_param_number">number</a></span>)</p>863 864 <div class="comments">865 NAME:866 GETCOLOR867 868 PURPOSE:869 The original purpose of this function was to enable the870 user to specify one of the 16 colors supported by the871 McIDAS color map by name. Over time, however, the function872 has become a general purpose function for handling and873 supporting drawing colors in a device-independent way.874 In particular, I have been looking for ways to write color875 handling code that will work transparently on both 8-bit and876 24-bit machines. On 24-bit machines, the code should work the877 same where color decomposition is turned on or off.878 879 (The 16 supported colors in GETCOLOR come from the McIDAS color880 table offered on the IDL newsgroup by Liam Gumley.)881 882 CATEGORY:883 Graphics, Color Specification.884 885 CALLING SEQUENCE:886 result = GETCOLOR(color)887 888 OPTIONAL INPUT PARAMETERS:889 COLOR: A string with the "name" of the color. Valid names are:890 black891 magenta892 cyan893 yellow894 green895 red896 blue897 navy898 gold899 pink900 aqua901 orchid902 gray903 sky904 beige905 white906 907 The color YELLOW is returned if the color name can't be resolved.908 Case is unimportant.909 910 If the function is called with just this single input parameter,911 the return value is either a 1-by-3 array containing the RGB values of912 that particular color, or a 24-bit integer that can be "decomposed" into913 that particular color, depending upon the state of the TRUE keyword and914 upon whether color decomposition is turned on or off. The state of color915 decomposition can ONLY be determined if the program is being run in916 IDL 5.2 or higher.917 918 INDEX: The color table index where the specified color should be loaded.919 If this parameter is passed, then the return value of the function is the920 index number and not the color triple. (If color decomposition is turned921 on AND the user specifies an index parameter, the color is loaded in the922 color table at the proper index, but a 24-bit value is returned to the923 user in IDL 5.2 and higher.)924 925 If no positional parameter is present, then the return value is either a 16-by-3926 byte array containing the RGB values of all 16 colors or it is a 16-element927 long integer array containing color values that can be decomposed into colors.928 The 16-by-3 array is appropriate for loading color tables with the TVLCT command:929 930 Device, Decomposed=0931 colors = GetColor()932 TVLCT, colors, 100933 934 935 INPUT KEYWORD PARAMETERS:936 937 NAMES: If this keyword is set, the return value of the function is938 a 16-element string array containing the names of the colors.939 These names would be appropriate, for example, in building940 a list widget with the names of the colors. If the NAMES941 keyword is set, the COLOR and INDEX parameters are ignored.942 943 listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16)944 945 LOAD: If this keyword is set, all 16 colors are automatically loaded946 starting at the color index specified by the START keyword.947 Note that setting this keyword means that the return value of the948 function will be a structure, with each field of the structure949 corresponding to a color name. The value of each field will be950 an index number (set by the START keyword) corresponding to the951 associated color, or a 24-bit long integer value that creates the952 color on a true-color device. What you have as the field values is953 determined by the TRUE keyword or whether color decomposition is on954 or off in the absense of the TRUE keyword. It will either be a 1-by-3955 byte array or a long integer value.956 957 START: The starting color index number if the LOAD keyword is set. This keyword958 value is ignored unless the LOAD keyword is also set. The keyword is also959 ignored if the TRUE keyword is set or if color decomposition in on in960 IDL 5.2 and higher. The default value for the START keyword is961 !D.TABLE_SIZE - 17.962 963 TRUE: If this keyword is set, the specified color triple is returned964 as a 24-bit integer equivalent. The lowest 8 bits correspond to965 the red value; the middle 8 bits to the green value; and the966 highest 8 bits correspond to the blue value. In IDL 5.2 and higher,967 if color decomposition is turned on, it is as though this keyword968 were set.969 970 COMMON BLOCKS:971 None.972 973 SIDE EFFECTS:974 None.975 976 RESTRICTIONS:977 The TRUE keyword causes the START keyword to be ignored.978 The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be ignored.979 The COLOR parameter is ignored if the LOAD keyword is used.980 On systems where it is possible to tell the state of color decomposition981 (i.e., IDL 5.2 and higher), a 24-bit value (or values) is automatically982 returned if color decomposition is ON.983 984 EXAMPLE:985 To load a yellow color in color index 100 and plot in yellow, type:986 987 yellow = GETCOLOR('yellow', 100)988 PLOT, data, COLOR=yellow989 990 or,991 992 PLOT, data, COLOR=GETCOLOR('yellow', 100)993 994 To do the same thing on a 24-bit color system with decomposed color on, type:995 996 PLOT, data, COLOR=GETCOLOR('yellow', /TRUE)997 998 or in IDL 5.2 and higher,999 1000 DEVICE, Decomposed=11001 PLOT, data, COLOR=GETCOLOR('yellow')1002 1003 To load all 16 colors into the current color table, starting at1004 color index 200, type:1005 1006 TVLCT, GETCOLOR(), 2001007 1008 To add the color names to a list widget:1009 1010 listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16)1011 1012 To load all 16 colors and have the color indices returned in a structure:1013 1014 DEVICE, Decomposed=01015 colors = GetColor(/Load, Start=1)1016 HELP, colors, /Structure1017 PLOT, data, COLOR=colors.yellow1018 1019 To get the direct color values as 24-bit integers in color structure fields:1020 1021 DEVICE, Decomposed=11022 colors = GetColor(/Load)1023 PLOT, data, COLOR=colors.yellow1024 1025 Note that the START keyword value is ignored if on a 24-bit device,1026 so it is possible to write completely device-independent code by1027 writing code like this:1028 1029 colors = GetColor(/Load)1030 PLOT, data, Color=colors.yellow1031 1032 MODIFICATION HISTORY:1033 Written by: David Fanning, 10 February 96.1034 Fixed a bug in which N_ELEMENTS was spelled wrong. 7 Dec 96. DWF1035 Added the McIDAS colors to the program. 24 Feb 99. DWF1036 Added the INDEX parameter to the program 8 Mar 99. DWF1037 Added the NAMES keyword at insistence of Martin Schultz. 10 Mar 99. DWF1038 Reorderd the colors so black is first and white is last. 7 June 99. DWF1039 Added automatic recognition of DECOMPOSED=1 state. 7 June 99. DWF1040 Added LOAD AND START keywords. 7 June 99. DWF.</div>1041 1042 1043 1044 1045 <h3>Parameters</h3>1046 1047 1048 <h4 id="_COLOR24_param_number">number 1049 1050 1051 1052 1053 1054 1055 1056 1057 </h4>1058 1059 <div class="comments"></div>1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 </div>1090 1091 1092 <div class="routine_details" id="_GETCOLOR">1093 1094 <h2><a class="top" href="#container">top</a>GETCOLOR </h2>1095 1096 <p class="header">1097 <span class="result">result = </span>GETCOLOR(<span class="result"><a href="#_GETCOLOR_param_thisColor">thisColor</a>, <a href="#_GETCOLOR_param_index">index</a></span>, <a href="#_GETCOLOR_keyword_TRUE">TRUE</a>=<span class="result">TRUE</span>, <a href="#_GETCOLOR_keyword_NAMES">NAMES</a>=<span class="result">NAMES</span>, <a href="#_GETCOLOR_keyword_LOAD">LOAD</a>=<span class="result">LOAD</span>, <a href="#_GETCOLOR_keyword_START">START</a>=<span class="result">START</span>)</p>1098 1099 <div class="comments"></div>1100 1101 1102 1103 1104 <h3>Parameters</h3>1105 1106 1107 <h4 id="_GETCOLOR_param_thisColor">thisColor 1108 1109 1110 1111 1112 1113 1114 1115 1116 </h4>1117 1118 <div class="comments"></div>1119 1120 <h4 id="_GETCOLOR_param_index">index 1121 1122 1123 1124 1125 1126 1127 1128 1129 </h4>1130 1131 <div class="comments"></div>1132 1133 1134 1135 1136 1137 1138 <h3>Keywords</h3>1139 1140 <h4 id="_GETCOLOR_keyword_TRUE">TRUE 1141 1142 1143 1144 1145 1146 1147 1148 1149 </h4>1150 1151 <div class="comments"></div>1152 1153 <h4 id="_GETCOLOR_keyword_NAMES">NAMES 1154 1155 1156 1157 1158 1159 1160 1161 1162 </h4>1163 1164 <div class="comments"></div>1165 1166 <h4 id="_GETCOLOR_keyword_LOAD">LOAD 1167 1168 1169 1170 1171 1172 1173 1174 1175 </h4>1176 1177 <div class="comments"></div>1178 1179 <h4 id="_GETCOLOR_keyword_START">START 1180 1181 1182 1183 1184 1185 1186 1187 1188 </h4>1189 1190 <div class="comments"></div>1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 </div>1218 1219 </div>1220 1221 1222 1223 <div id="tagline">Produced by IDLdoc 2.0.</div>1224 1225 </div>1226 1227 </body>1228 </html>
Note: See TracChangeset
for help on using the changeset viewer.