informatics-isi-edu / openseadragon-viewer

2D viewer with openseadragon
Apache License 2.0
5 stars 2 forks source link

Better heuristics for default color in annotation toolbar #44

Closed RFSH closed 4 years ago

RFSH commented 4 years ago

Currently, the toolbar is always showing red color by default. Since users wouldn't want to reuse colors for different annotations, this means that they almost always have to pick a color before drawing. We should improve this. The following are the improvements that we can apply:

RFSH commented 4 years ago

I ended up doing the described "better solution". So the code will now pick the first unused color from the color palette described here or a random color if all the colors are used.