Brian Dunning's FileMaker Custom Functions

Hex2RGB ( hex ; delimiter ; alert )

Converts hex color codes to decimal RGB

  Average rating: 3.7 (53 votes) Log in to vote

F. Osman Cabi   F. Osman Cabi - Show more from this author
Cabitas
http://thefilemakerblog.blogspot.com/

Share on Facebook Share on Twitter

  Sample input:
Hex2RGB ( "0CAB10" ; "-" ; "Hex is written wrong" )
  Sample output:
12-171-16

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Hex2RGB function converts standard hex color codes (generally used in html web sites) into RGB. Hex color codes is form of 6 or 7 (with #) characters. R is first two characters in hex format, G is next two characters in hex format and B is last two characters in hex format. For example "#FF00AA" is converted as decimal RBG as following : (171;205;239)

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: