uwerat / qskinny

A lightweight framework on top of the Qt scene graph and only few classes from Qt/Quick. It is usable from C++ and/or QML.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

color filter: Allow replacing a color with another one with different alpha value

peter-ha opened this issue · comments

Right now when substituting a color in qskSubstituteRgb() we take the color mask of the color to substitute, but the alpha mask of the color to draw, e.g. the brush.

For e.g. Material 3 we sometimes need to replace colors that have full opacity (e.g. button icons) with colors with less opacity (e.g. button icons in disabled state).

What is the best way to allow for that use case? I guess we cannot just simply return the substituted color and leave the alpha value as it is, because we want to support the use case where a color is substituted with another one no matter the alpha value, correct?