Stores the (seven) most characteristic colors of the selected images as keywords in their metadata. The colors are computed as part of the image analysis process that is automatically carried out for all images in a library. Colors are stored using a CSS compatible hexadecimal notation.
// Set Key Colors Of Selection As Keywords
var items = getItems()
var selection = getSelection()
for (i in selection) {
var fil = items[selection[i]]
var cols = fil.getKeyColors()
var keywords = []
for (j in cols)
keywords.push("keycolor|#"+rgbToHex(cols[j]))
fil.addKeywords(keywords)
}
Installation
- Copy the snippet source code above to the clipboard
- In Aspect, go to the “Snippets” page of the settings dialog and click “Add Snippet…”
- Paste the source code into the “Source Code” area - the “Menu Entry” field will be filled out automatically
The new menu entry should now be visible in the “File” menu and you can also optionally assign a keyboard shortcut in the “Shortcuts” section of the settings dialog.