bucket 'o bits blog

FileMaker Color Picker For Your Solutions

Most developers have worked on projects were we need to provide a means to enable the user to set colors. Perhaps to color calendar events, project tasks color a product category. Normally, you might provide a drop down list of colors by name, and then either use conditional formatting or a table of colors to set the color of the desired object.

I wanted to ramp things up a bit, by providing a more visual tool to the user. So I modeled a popover button after the same built-in color selector FileMaker provides to set text and object colors. To display color chips, I turned to the much maligned repeating field to do my dirty work. If you take a look at the sample selectors below, the color chips are a calculated repeating field from a color table.

To make this widget more flexible and adaptable, I included hex and RGB color values, in case I need to use those values in a future project implementation. The selector widgets can be easily added to a project by copying the colors table,and records, two scripts and one of the selector widgets into your solution. The colors can be modified, added or removed, to suit your need. Optionally, you can also copy the custom function to invert text colors when text is placed on a dark background.Try the widgets for yourself, if you like what you see, feel free to use use this technique in you solutions.


Get The File - ColorPicker.fmp12 (requires FileMaker Pro 13)

blog comments powered by Disqus