Overview

I received a request to change the colors of annotations added in IIIF Curation Viewer, so I will introduce one method for doing so.

The types of annotation markers are documented at the following link:

http://codh.rois.ac.jp/software/iiif-curation-viewer/annotation.html#マーカーの種類

While it is possible to manually or programmatically modify the JSON data, this time I will introduce a method using a GUI.

Video

I recorded a video of the workflow. Please use it as a reference. The example uses “Night Parade of One Hundred Demons” (held by the University of Tokyo General Library).

https://www.youtube.com/watch?v=fbfdQVxHTgs

Workflow

Adding Annotations in IIIF Curation Viewer

For this part, please refer to the following article:

https://zenn.dev/nakamura196/books/f4f87f9730e12e

As a result, annotations are displayed as blue rectangles as shown below. Let’s try changing the color of these rectangles.

Editing with a Custom Tool

To change the rectangle colors, I created a custom tool. You can access the editing screen at the following URL:

https://ndl-ocr.vercel.app/icv

Enter the Curation URI to navigate to the editing screen as shown below:

https://ndl-ocr.vercel.app/icv/editor?curation=https://mp.ex.nii.ac.jp/api/curation/json/bfb7d80e-4e51-44fb-97d2-94e7c5acb2fd

First, click “1. Download” to download the pre-edit data locally. This serves as a backup of the data before proceeding.

Next, following the video, edit the Color and Chars fields as shown below:

Then, click “3. Copy” to copy the edited JSON data.

Finally, following the video, open IIIF Curation Editor, update the JSON data, and verify the changes in annotation mode in IIIF Curation Viewer. As shown below, the rectangles are colored, and the strings specified in chars are displayed alongside them.

Summary

I hope this is helpful when you want to change rectangle colors and other properties in the annotation mode of IIIF Curation Viewer.