In Emacs, pdf-tools can be used to add annotations to a PDF document. It can be useful to have multiple annotation colours though, and be able to set these on the fly. Here’s an example of how to do it with four colours: ;; annotation colours(defunbms/pdf-annot-colour-blue()(interactive)(setqpdf-annot-default-markup-annotation-properties'((label."")(color."blue")(popup-is-open)))(message"%s"(propertize"Annotation colour set to blue."'face'(:foreground"blue"))))(defunbms/pdf-annot-colour-yel...