StreamAwesome icon indicating copy to clipboard operation
StreamAwesome copied to clipboard

Use alpha for duotone icons

Open shellixa opened this issue 1 year ago • 0 comments

Right now, colors for secondary parts of duotone icons are just darkened/brightened, but it would make much more sense to have a transparency slider in the UI that controls the alpha value of the secondary part.

This would also make any checks and custom logic for darkening obsolete.

Example:
Preset "Custom"; Icon Color #000000; Background Color #00FF6E

Right now: image

With Alpha Use: image

Implementation Idea

  • When a Duotone Style is selected, show a new "Duotone Transparency" Slider in the UI.
  • Set this.renderingContext.globalAlpha inside IconGenerator.drawIcon() accordingly to temporarily change the alpha of draw commands. After fillText(), set ..globalAlpha = 1

See also: #219

shellixa avatar Aug 05 '24 14:08 shellixa