Color Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an RGBA color with floating-point components in the range of 0.0 to 1.0.
public ref class Color
[System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Graphics.Converters.ColorTypeConverter))]
public class Color
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Graphics.Converters.ColorTypeConverter))>]
type Color = class
Public Class Color
- Inheritance
-
Color
- Attributes
Constructors
Color() |
Initializes a new instance of the Color class with default values (black). |
Color(Byte, Byte, Byte, Byte) | |
Color(Byte, Byte, Byte) | |
Color(Int32, Int32, Int32, Int32) | |
Color(Int32, Int32, Int32) | |
Color(Single, Single, Single, Single) | |
Color(Single, Single, Single) | |
Color(Single) | |
Color(Vector4) |
Fields
Alpha |
The alpha (opacity) component of the color, ranging from 0.0 (transparent) to 1.0 (opaque). |
Blue |
The blue component of the color, ranging from 0.0 to 1.0. |
Green |
The green component of the color, ranging from 0.0 to 1.0. |
Red |
The red component of the color, ranging from 0.0 to 1.0. |
Methods
Operators
Implicit(Vector4 to Color) |
Extension Methods
Lerp(Color, Color, Double) | |
IsDefault(Color) | |
IsNotDefault(Color) | |
ToColor(Color, Single) |
Converts a .NET MAUI Graphics color to a SkiaSharp color. |
AsSKColor(Color) |
Converts a .NET MAUI Graphics color to a SkiaSharp color. |
AsSKColorMultiplyAlpha(Color, Single) |
Converts a .NET MAUI Graphics color to a SkiaSharp color with a multiplied alpha value. |
ToArgb(Color, Single) |
Converts a .NET MAUI Graphics color to an ARGB integer representation with a modified alpha value. |
ToArgb(Color) |
Converts a .NET MAUI Graphics color to an ARGB integer representation. |