Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use alpha for duotone icons #233

Open
Logianer opened this issue Aug 5, 2024 · 0 comments · May be fixed by #234
Open

Use alpha for duotone icons #233

Logianer opened this issue Aug 5, 2024 · 0 comments · May be fixed by #234

Comments

@Logianer
Copy link
Contributor

Logianer commented Aug 5, 2024

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

@Logianer Logianer linked a pull request Aug 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant