Skip to content

Theme-based label colors (accessibility/aesthetic) #16728

Open
@clarfonthey

Description

@clarfonthey

Right now, issue label colors are based upon raw RGB colours, and it's basically impossible to make sure that they look legible on all themes. Although the existing, hex-based colour options can be kept (with the option to enable/disable via app.ini), it would be nice to allow theme-based colours which will simply output classes that can be styled per-theme. This way, if you want a label to be "red," for example, it would mark the issue with a .label-red class which can be configured using CSS, so that the theme can choose a suitable red that looks good for the theme. Alternatively, if we're fine requiring browsers that have CSS variables support, we could use those instead. Ideally, the default label sets would use these colours instead of raw RGB colours.

We could probably add some kind of metadata to themes to list what colours they offer, then simply allow users to choose the colours that are available for all themes. This way, themes can add custom colours and they're usable as long as all themes that a user can pick have those colours.

This would also help for acessibility-focused themes, as they could adjust the colours on the labels for people who might not easily be able to read the existing colours or have colour blindness.


For a more concrete example, let's say that #16729 is merged and the user chooses #FF0000 as a label color. Here's what it looks like on both default themes:

light theme
dark theme

Imagine that instead the colour was listed as "red," which can be configured based upon the theme. I'll choose the a suitable red from both themes:

light theme
dark theme

If you tell someone to look for the red label, it's still red; it just fits in with the theme better. And, more importantly, if someone has some form of colourblindness that makes certain colours difficult for them to distinguish, they can opt to use a different theme which modifies the colour to one they can more easily distinguish. Saying "look for the red label" for these people already would have not been helpful, so losing that colour information is acceptable in exchange for accessibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/themetype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions