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?