Re: COLOR MIXI
Re: COLOR MIXI
- Subject: Re: COLOR MIXI
- From: "Roger Howard" <email@hidden>
- Date: Tue, 28 Aug 2001 15:09:53 -0700
Geunter,
The problem is that neither FileMaker now AppleScript can programmatically mix colors and create a graphic swatch of that RGB value to be placed directly into a FileMaker container field.
I can imagine a number of ways to accomplish this, however, but all will require some form of hackish solution. The best one i can think of off the top of my head would be this, using Akua Sweets:
1. Create a new database (let's call it "Color.fp5" containing two fields - a container field and a text field. The container will be used to house unique color swatches, and the text field will contain the RGB value as a simple list (like "112451,23592,34733")
2. Create a relationshop with your other database using the RGB values text field as a key againsts the RGB value field you have in your primary database
3. When synthesizing a new color in the primary database, if a record doesn't exist in "Color.fp5" to match it then create a new record there with the value and then run a script containing an AppleScript to do the following:
a. Using Akua sweets create a new swatch sized to what you want and filled with the color you need. Here is a sample hard-code script that creates a 32x32 swatch filled with an RGB value.
-- Begin script sample
set tSwatchWindow to display drawing "Sample" with dimensions {32, 32} with a close box
quickdraw a box into tSwatchWindow in {0, 0, 32, 32} filling it with the pen using state {pen color:"773322"}
set tSwatchPict to (capture picture from tSwatchWindow with pixel conversion and proxy return) as picture
display drawing tSwatchWindow with disposal
-- End script sample
b. Now you have a picture object, "tSwatchPict", which should be a 32x32 pixel color swatch.
c. Stash the picture into the container field of the proper record in Filemaker.
Since I don't have FileMaker Pro here I'll have to wait until I get home to test this and determine how to get this picture object into FileMaker, however you may likely just be able to set the "cellValue" of the appropriate sell to this picture object and you're done.
This is more a direction you should look in - i spent about 2 minutes testing this - but it's the only way I can think of without additional applications involved (which will slow things down quite a bit).
Hope this helps, feel free to ask for clarification,
Roger Howard
Digital Media Specialist
Museum Information Systems
The J. Paul Getty Museum
email@hidden
310.440.6908