Ref: PopClip v2024.5.2
The following is a modified version of the official ‘Icon Preview’ snippet to enable icon selection, as the original version dimmed icon colours (as the icon was not selectable).
// #popclip
// name: Icon Preview
// entitlements: [dynamic]
// language: javascript
// module: true
exports.actions = () => {
return [
{
icon: popclip.input.text,
code: function() {
popclip.showText("Hello World!");
}
},
];
};
If you test this snippet with the following, you’ll see that the icon/swatch is not rendered as pure red #ff0000. Possibly due to UI transparency?
preserve-color svg:<svg width="1em" height="1em" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="24" height="24" rx="3" ry="3" fill="#ff0000"></rect></svg>
If PopClip could render icons in their specified colours (possibly with a custom preference to remove UI transparency), I’m hoping it might be possible to create a snippet which displays an icon/swatch for the selected colour.