RGB.get ( )

Function stats

Average user rating
37
314
9999
Support
FileMaker 8.5 +
Date posted
30 June 2011
Version
1
Recursive function
No

Author Info
 Fabrice

74 functions

Average Rating 4.4

author_avatar



 

Function overview

Prototype

RGB.get  ( RGBcolor )


Parameters

RGBcolor  number (can be the result of RGB function)


Description

Tags:  Interface   Colors  

lists the 3 components of a color (inverse of RGB function)

Examples

Sample input

RGB.get ( 6566425 )
RGB.get ( RGB ( 100 ; 50 ; 25 )) // same thing


Sample output

"100¶50¶25"

 

Function code

/* RGB.get ( RGBcolor )

by Fabrice Nordmann, 1-more-thing
http://www.1-more-thing.com


June 2011

lists the 3 components of a color (inverse of RGB function)

RGB.get ( 6566425 ) -> "100¶50¶25"

*/

Let ([
    _sq = 256^2 ;
    _r = Int ( RGBcolor / _sq ) ;
    _g = Int (( RGBcolor - _r *_sq ) / 256 ) ;
    _b = RGBcolor - _r * _sq - _g*256
];
    List ( _r ; _g ; _b )
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/314

    Prototype: RGB.get( RGBcolor )
    Function Author: Fabrice (http://www.fmfunctions.com/mid/37)
    Last updated: 30 June 2011
    Version: 1

*/
// ===================================

 

 

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (31)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (12)
Layout Objects  (11)
Filter  (11)
Design  (10)
Array  (7)