![]() ![]() In XAML, colors are typically referenced using their named values, or with hexadecimal: ToHsl converts a Color to HSL float values that are passed as out arguments.ToRgba converts a Color to RGBA byte values that are returned as out arguments.ToRgb converts a Color to RGB byte values that are returned as out arguments.ToUint returns an ARGB uint representation of a Color.ToInt returns an ARGB int representation of a Color.ToRgbaHex returns an RGBA hexadecimal string representation of a Color.ToArgbHex returns an ARGB hexadecimal string representation of a Color.ToHex returns a hexadecimal string representation of a Color.AsPaint returns a SolidPaint object whose Color property is set to the color.The following instance methods convert a Color to an alternative representation: WithSaturation returns a Color, replacing the saturation value with the supplied float value. ![]() WithLuminosity returns a Color, replacing the luminosity value with the supplied float value.WithHue returns a Color, replacing the hue value with the supplied float value.WithAlpha returns a Color, replacing the alpha value with the supplied float value.MultiplyAlpha returns a Color by multiplying the alpha value by the supplied float value.GetComplementary returns the complementary Color.AddLuminosity returns a Color by adding the luminosity value to the supplied delta value.The following instance methods modify an existing color to create a new color: The Colors class defines 148 public static read-only fields for common colors, such as AntiqueWhite, MidnightBlue, and YellowGreen. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |