Skip to content

SP5 Color: WithAlpha() should have an overload that accepts a float #2776

@swharden

Description

@swharden

Something like

/// <summary>
/// Return the color with an alpha from 0 (transparent) to 1 (opaque)
/// </summary>
public static Color WithAlpha(this Color color, double alpha=1)
{
    /* ... */
}

goes here

public readonly Color WithAlpha(byte alpha) => new(Red, Green, Blue, alpha);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueThis issue has limited complexity and may be a good start for new contributorsHelp WantedScott won't do this soon, but PRs from the community are welcome!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions