Skip to content

Instantly share code, notes, and snippets.

@sillygwailo
Created January 24, 2026 17:19
Show Gist options
  • Select an option

  • Save sillygwailo/c13baf5c01af18e71bc8b593b67aec28 to your computer and use it in GitHub Desktop.

Select an option

Save sillygwailo/c13baf5c01af18e71bc8b593b67aec28 to your computer and use it in GitHub Desktop.
Sets the note text color to black for the selected item.
/*{
"type": "action",
"targets": ["omnifocus"],
"author": "Ethical Detergent",
"identifier": "com.ethicaldetergent.of.setNoteTextColorBlack",
"version": "1.0",
"description": "Sets the note text color to black for the selected item.",
"label": "Set Note Text Color to Black",
"shortLabel": "Set Note Text Color to Black",
"paletteLabel": "Set Note Text Color to Black",
"image": ""
}*/
(() => {
const action = new PlugIn.Action(function (selection, sender) {
items = selection.databaseObjects.filter(
item => (item instanceof Project || item instanceof Task)
)
if (items.length === 1) {
noteObj = items[0].noteText;
var item = selection.databaseObjects[0]
try {
item.noteText.style.set(Style.Attribute.FontFillColor, Color.black);
}
catch (err) { console.error(targetAtt.key, err.message) }
}
})
return action;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment