Brian Dunning's FileMaker Custom Functions

coloris ( defaultColour ; swatches ; targetScript )

Returns html and javascript for coloris colour picker to be rendered in a webviewer.

  Be the first to rate this function Log in to vote

Jonni™   Jonni™ - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
coloris ( "#C9C9C9" ; "'#ffddce', '#ffc2a8', '#ffa783'" ; "myScript" )
  Sample output:
coloris code for webviewer

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

Along with coloris.js (https://www.briandunning.com/cf/2773) this function returns html and javascript for coloris colour picker to be rendered in a webviewer (200x320px).

Make sure to have supporting custom function installed (coloris.js).

defaultColour is declared as a hex colour code prefixed with a #

swatches are declared as an array of hex colour codes prefixed with a # in single quotes, separated with a comma. You can declare a series of preset swatches that will appear under the main picker in three rows of 6 swatches (a total of 18).

targetScript is the script set to run and receive the picked colour. The colour can be picked by the scriptParameter and processed as needed.

Written with initial input from pctechtv.com

 

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: