Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-configurable colours for categories #41

Open
martindholmes opened this issue Aug 31, 2021 · 1 comment
Open

User-configurable colours for categories #41

martindholmes opened this issue Aug 31, 2021 · 1 comment
Assignees
Milestone

Comments

@martindholmes
Copy link
Owner

Colours for categories are currently assigned using an algorithm based on a set of ten pairs of colours/background colours which are designed to be maximally distinctive without clashing. However, it would also be useful to allow colours for specific categories to be configured in the TEI file; specific colours might match the purpose of categories in particular projects.

This could be achieved by using @style on the <category> element and providing color and background-color properties; those could then be harvested into the JSON, applied as custom properties to the category, and then passed to the getCategoryStyle function.

@martindholmes martindholmes added this to the Release 1.2 milestone Aug 31, 2021
@martindholmes martindholmes self-assigned this Aug 31, 2021
@martindholmes
Copy link
Owner Author

One worry here would be that @style is specifically defined as capturing the appearance of a source text. There is (usually) no source text here, and the use of @style is arguably tag abuse. I'll think about some more appropriate approaches here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant