Documentation for pp_lib

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

./

pp_colortripletolong.pro


Author information

Author

Paulo Penteado (http://www.ppenteado.net), Aug/2015

Routines

top source pp_colortripletolong

result = pp_colortripletolong(icolors)

Converts colors from RGB color triples to long integers. Input can be a single triple or multiple triples, as an array of any dimension. The inverse of this function is pp_longtocolortriple.

Return value

An array with colors encoded as long integers, one long per per input triple. Output dimension is one less than input.

Parameters

icolors in required

An array of color triples. The first dimension of the array must have size 3, and be the color dimension.

Examples

Convert black and white, from RGB vectors to long integers:

print,pp_colortripletolong([[0,0,0],[255,255,255]]) ; 0 16777215

Author information

Author:

Paulo Penteado (http://www.ppenteado.net), Aug/2015

Statistics

Lines:
10 lines
Cyclomatic complexity:
1
Modified cyclomatic complexity:
1

File attributes

Modification date: Wed Jun 29 22:15:28 2016
Lines: 10
Docformat: rst rst