On Jun 12, 2009, at 8:07 PM, Peter Rich wrote: > I've been using Skim for a while now, but just recently realized I > could create my own export templates (I know, I should read the Wiki > more often). Anyhow, I wanted to export a simple plain text document > that had the color of the note in addition to the type. In looking > at the value keys, though, I realized that the color is determined > by separate red, green, and blue values. Is there any way to use a > condition tag to say, "if red=xxx AND blue=xxx AND green = xxx then > color = 'yellow'?" Since we can only pick our colors from a > restricted pallet anyway, these rgb combinations are going to be a > fixed set, so I can easily know which combos to expect and what > their associated name is. > > Is something like this possible? > > -- > Peter Rich, PhD > peter_rich [at] byu [dot] edu > Instructional Psychology & Technology > Brigham Young University > Provo, Ut 84602
Not really. First of all: why are you saying you have a fixed palette? Currently you can choose colors virtually continuously. There is no deterministic way to map a (continuous) color to a color name, because there's only a finite (very limited) number of color names. If you can figure out a set of rules for the few colors that you personally you will always use and get names for them, you could do this by adding condition tags to the template. Something like this (though probably even more complicated): <$color.redComponent<0.3?> <$color.greenComponent<0.3?> <$color.blueComponent<0.3?> black <?$color.blueComponent<0.6?> dark blue <?$color.blueComponent?> blue </$color. blueComponent?> <?$color.greenComponent<0.6?> ... <?$color.greenComponent?> ... </$color.greenComponent?> <?$color.redComponent<0.6?> ... <?$color.redComponent?> ... </$color. redComponent?> ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Skim-app-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/skim-app-users
