./
pp_longtocolortriple.pro
Author information
- Author
Paulo Penteado (http://www.ppenteado.net), Aug/2015
Routines
top source pp_longtocolortriple
result = pp_longtocolortriple(icolors)
Converts colors from long integers to RGB color triples. Input can be either scalar
or an array. The inverse of this function is
pp_colortripletolong
.
Return value
An array with RGB color triples, one triple per input element. If input is an array, output is an array with one extra dimension, of size 3, as the first dimension. If input is scalar, output is simply a 3-element array.
Parameters
- icolors in required
A scalar or array of colors encoded as long integers.
Examples
Convert black and white, from long integers to RGB vectors:
print,pp_longtocolortriple([0L,2L^24-1])
; 0 0 0
; 255 255 255
Author information
- Author:
Paulo Penteado (http://www.ppenteado.net), Aug/2015
Statistics
Lines: | 10 lines |
Cyclomatic complexity: | 2 |
Modified cyclomatic complexity: | 2 |
File attributes
Modification date: | Wed Jun 29 22:15:28 2016 |
Lines: | 10 |
Docformat: | rst rst |