Description
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:
- API Proposal: Primitive Color and Color8 Types for .NET Core runtime#32418
- API Proposal: Add blittable Color to System.Numerics runtime#48615
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.