Brian Dunning's FileMaker Custom Functions

AS_Dialog_Choose_Color ( result_field ; output_format ; default_color )

use Apple color chooser to choose a color in formats Filemaker decimal, FileMaker RGB, css RGB and HEX

  Average rating: 4.0 (47 votes) Log in to vote

Thomas Siebert   Thomas Siebert
http://www.t-seabird.de

Share on Facebook Share on Twitter

  Sample input:
Perform AppleScript [ AS_Color_Choose ( table::target_field ; 0 ; table::target_field) ]

Perform AppleScript [ AS_Color_Choose ( table::target_field ; 1 ; "#FF0066") ]
  Sample output:
10053171

#FFFF22

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

Apple/Mac only.
opens the Apple standard color chooser via AppleScript and returns the result as RGB values or HEX to a FileMaker text field.

input / output_format:
0 = FileMaker Decimal --> 10053171
1 = RGB, (FileMaker style) --> RGB (153;102;51 )
2 = RGB, (html/css style) --> 153,102,51
3 = HEX, (html/css style) --> #996633


Use the cf within the scriptstep "Perform AppleScript".
Choose the option "Calculated AppleScript".

You also shall use "Perform AppleScript" directly from a button.

 

Comments

Michael Holznagel   Michael Holznagel, Germany
Apr 3, 2010
Apple Mac OS 10.5.8/FM Pro Advanced 10: Works fine. No Snow Leopard required.
 
Thomas Siebert   Thomas Siebert
Nov 14, 2015
complete rewrite of the function.
the whole code is AppleScript now.
 
Thomas Siebert   Thomas Siebert
Apr 25, 2017
New input/output format: FileMaker decimal
The number is usable within the function "TextColor ( text ; RGB ( red ; green ; blue ) )"
such as:
TextColor ( text ; 10053171 )

some errors in color conversions corrected
 
Thomas Siebert   Thomas Siebert
Apr 25, 2017
canceling color chooser dialog doesn't return an error message anymore
 

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.

Under construction. Email me your wish list for improvements.