Skip to content

Consider moving MAUI's Color type into the base .NET #16903

Open
@aaronfranke

Description

@aaronfranke

Description

https://github.com/dotnet/maui/blob/main/src/Graphics/src/Graphics/Color.cs

This data type is highly useful and general. I would appreciate having it defined outside of MAUI so that many C# applications and libraries can use it as a data interchange type for floating-point RGBA colors.

Since Color is very similar in structure to other numeric types like Vector2, Vector3, etc, I would suggest adding it to the System.Numerics namespace in .NET.

See also these previous discussions:

Public API Changes

Immediately, nothing would change for MAUI. Long-term, MAUI would use the .NET Color type as a drop-in replacement for the current Color type, since it would be very similar (or identical) to the format already in MAUI.

Intended Use-Case

Interoperability between different C# applications and libraries to have one common Color type that can be used to transfer simple floating-point RGBA values in a standard format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions