mgmeyers / pdfannots2json

GNU Affero General Public License v3.0
42 stars 5 forks source link

FR: use rgb color ranges for the `color` key instead of hex values #8

Closed chrisgrieser closed 2 years ago

chrisgrieser commented 2 years ago

Reference: https://discord.com/channels/686053708261228577/928964558721265694/962281335135821864

Having, say, a dozen possible values instead of the 256^3 values of hex would make it much easier to build some stuff around highlight color automation.

argenos commented 2 years ago

Optionally: settings to define which colours to recognize/use which can also be something customised on most PDF viewers.

mgmeyers commented 2 years ago

Annotations now have a colorCategory property that's one of:

Black
White
Gray
Red
Orange
Yellow
Green
Cyan
Blue
Purple
Magenta

It uses the same approach as zotfile. Does this work for your use case?

chrisgrieser commented 2 years ago

yeah, I think that should work. 🚀