Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Color: Add obsolete FromHtml()
Browse files Browse the repository at this point in the history
Add System.Drawing.ColorTranslator.FromHtml() functionality to Color, marking it obsolete with a message indicating to use Parse() instead
  • Loading branch information
swharden committed Jan 15, 2022
1 parent ba4e138 commit 87ec349
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Microsoft.Maui.Graphics/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ public string ToRgbaHex(bool includeAlpha = false)
[Obsolete("Use FromArgb instead.")]
public static Color FromHex(string colorAsArgbHex) => FromArgb(colorAsArgbHex);

[Obsolete("Use Parse instead.")]
public static Color FromHtml(string htmlColor) => Parse(htmlColor);

public Paint AsPaint()
{
return new SolidPaint()
Expand Down

0 comments on commit 87ec349

Please sign in to comment.