Changeset 133 for trunk/SRC/Colors/color24.pro
- Timestamp:
- 07/07/06 11:57:27 (18 years ago)
- Location:
- trunk/SRC/Colors
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Colors/color24.pro
r132 r133 1 1 ;+ 2 ; NAME:3 ; COLOR244 2 ; 5 ; PURPOSE:6 ; 7 ; 3 ; @file_comments 4 ; The purpose of this function is to convert a RGB color triple 5 ; into the equivalent 24-big long integer. 8 6 ; 9 ; CATEGORY: 10 ; Graphics, Color Specification. 7 ; @categories Graphics, Color Specification. 11 8 ; 12 ; CALLING SEQUENCE: 13 ; color = COLOR24(rgb_triple) 14 ; 15 ; INPUTS: 16 ; RGB_TRIPLE: A three-element column or row array representing 9 ; @param RGB_TRIPLE {in}{required} A three-element column or row array representing 17 10 ; a color triple. The values of the elements must be between 18 11 ; 0 and 255. 19 12 ; 20 ; KEYWORD PARAMETERS: 21 ; None. 13 ; @returns a 24-bit long integer that is equivalent the input color. 14 ; The color is 15 ; described in terms of a hexidecimal number (e.g., FF206A) 16 ; where the left two digits represent the blue color, the 17 ; middle two digits represent the green color, and the right 18 ; two digits represent the red color. 22 19 ; 23 ; COMMON BLOCKS: 24 ; None. 25 ; 26 ; SIDE EFFECTS: 27 ; None. 28 ; 29 ; RESTRICTIONS: 30 ; None. 31 ; 32 ; EXAMPLE: 33 ; To convert the color triple for the color YELLOW, 20 ; @examples To convert the color triple for the color YELLOW, 34 21 ; (255, 255, 0), to the hexadecimal value '00FFFF'x 35 22 ; or the decimal number 65535, type: … … 40 27 ; COLORS or GETCOLOR 41 28 ; 42 ; MODIFICATION HISTORY:29 ; @history 43 30 ; Written by: David Fanning, 3 February 96. 31 ; 32 ; @version $Id$ 33 ; 44 34 ;- 45 46 47 35 FUNCTION COLOR24, number 48 36 ; 49 37 compile_opt idl2, strictarrsubs 50 ; 51 52 ; This FUNCTION accepts a [red, green, blue] triple that 53 ; describes a particular color and returns a 24-bit long 54 ; integer that is equivalent to that color. The color is 55 ; described in terms of a hexidecimal number (e.g., FF206A) 56 ; where the left two digits represent the blue color, the 57 ; middle two digits represent the green color, and the right 58 ; two digits represent the red color. 59 ; 60 ; The triple can be either a row or column vector of 3 elements. 61 38 ; 62 39 ON_ERROR, 1 63 40
Note: See TracChangeset
for help on using the changeset viewer.