twinejs
twinejs copied to clipboard
2.4: More tag colours
Is your feature request related to a problem? Please describe.
Here's a real-world example of the tags I used in my latest story. As you can see, I had to double-up on colours a lot due to there only being 6 tag colours. Four of these tags are Harlowe-specific semantic tags, but even if they share a colour, there's still not much left to go around.
Describe the solution you'd like.
OK, I understand why you probably don't want to add more colours: because there's no room left on the hue wheel for ones that are visually distinct at a distance. However, I think there's room to be had by adding brightness-altered variants. Imagine, for instance, another "red" called "red 2" (example name) defined as:
.tag-editor .tag-name.color-red { background-color: var(--red); border: 1px solid var(--light-red); color: var(--black); }
It would look like this compared to the normal red (ignore the example tags' names):
Granted, in light mode it's a bit tricky to spot the difference between them in the passage map (when the stripe is at that zoom level) but I think it's an improvement over just using the exact same red for two tags.
Additional context on this suggestion.
No response
Presubmission checklist
- [X] I am interested in working on code that would implement this feature request. (This is not required to submit a suggestion.)
- [X] I have done a search and believe that an issue does not already exist for this idea in the GitHub repository.
- [X] I have read and agree to abide by this project's Code of Conduct.
Biggest concern I have with this suggestion is that we'd have accessibility issues related to contrast ratios to grapple with. And... at least to my eyes, the different between the reds in the example screenshot you produced are really hard to make out. So, right now my feeling is it's worth investigating but have to approach it carefully.
Biggest concern I have with this suggestion is that we'd have accessibility issues related to contrast ratios to grapple with. And... at least to my eyes, the different between the reds in the example screenshot you produced are really hard to make out. So, right now my feeling is it's worth investigating but have to approach it carefully.
I think the answer is just to let the author's choose custom colours for tags. There seems to be little reason the <tw-tag>
elements couldn't take any valid HTML colour name, or indeed a hex value. I know that's not the way the spec is written, but I don't think the "seven named colours" is the best part of the spec in the first place.
Right now, the user.css
would allow authors to recolour tags for themselves, but in a very-much less than ideal way