Skip to content

Use alpha for duotone icons #233

@shellixa

Description

@shellixa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesticonsChanges the icon generator capabilities

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions