Accent Colours, they're a great addition to Plasma, but they could definitely be improved upon.
This MR brings in most of the changes to Colours KCM in the upcoming Feren OS Plasma 5.23 update, most because it excludes the addition of Feren OS's colours to the palette, and some minor tweaks to colour intensities, etc.
NOTE: What this MR changes also extends to the Colour Previews, as they have separate code that also was changed to make them match the end result of this MR too.
Note to prevent confusion:
No, this MR doesn't change the foreground of anything other than the selection foreground, when accent is on, and titlebar foregrounds of titlebars that meet the criteria mentioned below (when accent is on). All other foregrounds remain being the foreground colours the colour scheme's maker intended them to be. The Feren OS colour scheme screenshots have pure black/white foregrounds simply because that's how Feren OS's colour scheme is meant to look generally.
What this MR changes:
This MR gives the accent-overridden pieces of the colour scheme overridden foregrounds as well, preventing readability issues with accents and certain colour schemes when paired up. Additionally, this MR will also prevent readability issues with lighter colours as the text colour is determined between being black or white by the colour's luminosity, aka brightness.
Titlebars now have accents
At the choice of colour scheme creators.
Colour Schemes that don't meet the titlebar criteria work just like before:
Except now they have the benefits of selection foreground overriding.
Colour Scheme creators can choose if their titlebars get recoloured when accents are on:
This makes sure that the colour scheme creator can have accent colouring work the way they intend for it to work, and allows freedom for some to only colour active titlebars, while others can colour both active and inactive titlebars, or still preserve the option to not have a titlebar recolouration whatsoever when using accents.
The reason for not giving the user themselves control of this is that colour schemes designed around accentable titlebars will look incomplete or broken when only accent colour is on but not an option to accent-colourise titlebars, and a user shouldn't be expected to toggle a switch to make colour schemes work the way their creators intended with regards to that.
The option to enable it is in the Colour Scheme Editor, the place creators can manage all the options for colour schemes in.
(ignore the titlebar colour matching the accent colour in this Before image - must've accidentally taken the screenshot on an earlier version of the MR (back when it had 'titlebar colour = selection colour?' logic) and didn't realise)
Colour Schemes to test with:
Below are some good examples of colour schemes to test this MR with: