Skip to content

Allow icon themes to also use the colour scheme's selected foreground colour for icon colouring

This merge request allows icon themes to be able to use the selected foreground colour from the active colour scheme to colour their icons, complementing the existing functionality to use the selected background colour in icons.

The class that icon set makers can use to make use of this functionality is "HighlightedText" (for background colour it's "Highlight").

This change is necessary for those who want to make icon sets which have certain icons be coloured according to the selected colours, which can amount to an accent colour of sorts. Without icon set makers also being able to make their icons adapt to the selected foreground colour, on top of the selected background colour, they usually have to resort to using a near-white or white overlay for any symbols on said icons, which leads to rubbish contrast and readability on lighter selected background colours.

Such icon sets already exist, with Breeze Chameleon being a primary example of this, and they all end up suffering because of the aforementioned contrast/readability issue, which having this implemented will allow them to fix. I also plan on making Feren OS's Inspire icon set soon have folder icons that get coloured depending on the selected background (and foreground colour if this is merged) in the upcoming icon set redesign for Feren OS.

Demonstration of this change in effect and being utilised (look at the File Manager (second-left) icon): Peek_2020-06-17_22-00

Before this change the white parts of that icon would be permanently black.

Edited by Dominic Hayes

Merge request reports