Reorganize colorscheme colors and use them in a logical manner
Open, NormalPublic

Description

Currently, we have a lot of colorscheme colors. We don't even use all of them. The ones that we do use aren't always used in a consistent or even logical manner. The Active Text/Background colors in particular don't have a clear role. I think we need to remove/deprecate or at least hide colors that we won't ever use and we should be more consistent about how we use the colors that we keep.

Issues

Examples of illogical and inconsistent usage:

  • The button and menu item focus color is actually controlled by the View Focus Decoration color in the Breeze QStyle.
  • The Task Manager highlight color is controlled by the Button Focus Decoration color.
  • QPalette::Highlight is mapped to Selection Background and is used somewhat interchangeably with Focus Decoration colors. This works fine for the current version of the Breeze colorscheme, but not for any color scheme that uses a different Selection Background color from the Focus Decoration color.
  • View NegativeText is used for MDI widget titlebars instead of Button NegativeText.
  • Sometimes a semitransparent or blended QPalette::Highlight is used for hover effects.

Unused colors:

  • Window: Alternate Background, Focus Decoration, Hover Decoration
  • Button: Alternate Background
  • Selection: Alternate Background, Focus Decoration, Hover Decoration
  • Tooltip: Alternate Background, Focus Decoration, Hover Decoration
  • Complementary: Most of these aren't used, but this is because it's uncommon to use an alternative colorscheme for some parts of the UI.
  • All color sets: Active Text, Active/Link/Visited/Positive/Neutral/Negative Background

Alternative Background

  • View Alternate Background
    • Alternate rows
    • Sidebar backgrounds
      • VS Code does something similar and it looks good
  • Window Alternate Background
    • Not sure
    • Section header backgrounds in sidebars?
  • Button Alternate Background
    • Sunken state
  • Selection Alternate Background
    • Inactive selected item backgrounds
  • Tooltip Alternate Background
    • Not sure
    • Some kind of special background in complex tooltips like in KDevelop?

Focus Decoration

  • Does every color set really need its own focus decoration color?
  • What if the whole Selection color set was for coloring widgets with focus/selection instead of having a Focus Decoration role?
    • Focus is not the same as selection, but Selection Normal Background could be used for focus/selection and Selection Alternate Background could be used for unfocused/inactive selection
    • This could allow KColorScheme colors to map more directly to QPalette.

Hover Decoration

  • I don't really want to use this for the Breeze evolution. I want the hover color to be based on the color of the item that is being hovered over, but that makes a dedicated hover color useless.
    • Even with that aside, the hover color was always either a copy of the focus color (Breeze Dark color scheme) or a faded version of it (Breeze color scheme).

Active Text/Background

Here is the current documentation:

Active Text:

Third color; for example items which are new, active, requesting attention, etc. May be used as a hover color for clickable items.

Active Background:

Third color; for example, items which are new, active, requesting attention, etc.

Alerting the user that a certain field must be filled out would be a good usage (although NegativeBackground could be used to the same effect, depending on what you are trying to achieve). Unlike ActiveText, this should not be used for mouseover effects.

  • Active Text overlaps with Hover Color and Neutral Text (often used for things that need attention)
  • Active Background overlaps with how Negative and Neutral Text are used sometimes (although Background is more semantically correct than Text)
  • Maybe get rid Active Text and Background?
  • I considered using yellow for these, but it just doesn't work well with light themes since the contrast is bad.
    • Dark yellow/Orange does not work because it just looks like an ugly brown. Fun fact, we perceive brown when yellow/orange are surrounded by brighter colors. You cannot have a dark saturated yellow on a computer screen because all the other LEDs are emitting more light.

Link/Visited/Positive/Neutral/Negative Background

3rd Party Issues

  • Many 3rd party color schemes just use old default Breeze colors for the currently unused colors. Many users with a custom color scheme will probably experience ugly color combinations until they or the color scheme author updates the color scheme.
    • The problem with only sticking to commonly used colors and using things like KColorUtils to create new colors in the QStyle as needed is that it greatly limits what colors can be used well. You will never get light and dark themes to look equally and consistently great unless the light and dark themes are just inversions of each other.
ndavis created this task.Sep 17 2019, 7:22 PM
ndavis triaged this task as Normal priority.
ndavis moved this task from Reported to Apps Implementation on the Goal: Consistency board.
ndavis updated the task description. (Show Details)
filipf added a subscriber: VDG.Sep 23 2019, 5:00 PM

But it's not only about Plasma right? KColorScheme can also be used by applications. For example the complementary colors are especially targeted at applications if you read the documentation.

Complementary: I don't think any of these are used.

Quick lxr search, for example:
kdeconnect uses Kirigami.Theme.complementaryTextColor
ktouch uses it
as does kdenlive

When you think about reorganizing please note that all these enums are part of the public API of a frameworks library.

But it's not only about Plasma right? KColorScheme can also be used by applications. For example the complementary colors are especially targeted at applications if you read the documentation.

Complementary: I don't think any of these are used.

Quick lxr search, for example:
kdeconnect uses Kirigami.Theme.complementaryTextColor
ktouch uses it
as does kdenlive

When you think about reorganizing please note that all these enums are part of the public API of a frameworks library.

TBH, I forgot this task existed, so I never updated it. I've learned more about KColorScheme since writing it. Yes, complementary colors are used.

ndavis updated the task description. (Show Details)Dec 22 2019, 4:55 PM