Skip to content

Color: add FromHtml() static method #4370

@swharden

Description

@swharden

A Color can be constructed by passing a hex code into the initializer, but it would be convenient if a static method were also present to compliment the existing FromARGB() and similar static methods

Actually, I just realized there's already a FromHex() here:

public static Color FromHex(string hex) => new(hex);

The best fix is to add a line beneath that, something like:

public static Color FromHtml(string html) => new(html);

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