Brian Dunning's FileMaker Custom Functions

LightenColor ( coloreHex ; lightenDec )

Lighten a hexadecimal colour by a decimal value.

  Average rating: 5.0 (1 vote) Log in to vote

Martin Pineault   Martin Pineault - Show more from this author
f.i.SCIENCES Développement inc.
http://www.fisciences.com

Share on Facebook Share on Twitter

  Sample input:
LightenColor ( "FF00FF" ; 20 ) // FF00FF is Pink
  Sample output:
FF3AFF

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

Does take care of overflow.
Miss the possibility to decrease/darken (-20).

 

Comments

Hans Nagelgast   Hans Nagelgast, None
May 26, 2020
I would like to use this function, but the used commands are in French. The English version will not accept this code. Could you provide an English version too?
 
Martin Pineault   Martin Pineault, f.i.SCIENCES Développement inc.
May 26, 2020
Oups, there you go!
 
Martin Pineault   Martin Pineault, f.i.SCIENCES Développement inc.
May 26, 2020
Oups, there you go!
 
Lazarus Sismanis   Lazarus Sismanis, Decision Group
May 27, 2020
Seem to be a very useful custom function. However, it references custom functions 'DecToHex' and 'HexToDec'. While the second is available on this site, there is no matching custom function for 'DecToHex'. Can you please provide? Thank you sir.
 
Martin Pineault   Martin Pineault, f.i.SCIENCES Développement inc.
May 27, 2020
I renamed 'DecToHex' to 'NumToHex' should be fine now.
Thank you for pointing that out!
 
Lazarus Sismanis   Lazarus Sismanis, Decision Group
May 27, 2020
Excellent stuff! Thanks Martin.
 

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: