@ -152,6 +152,8 @@ namespace SixLabors.ImageSharp
/// </returns>
public static Color Parse(string input)
{
Guard.NotNull(input, nameof(input));
if (!TryParse(input, out Color color))
throw new ArgumentException("Input string is not in the correct format.", nameof(input));
@ -243,6 +243,8 @@ namespace SixLabors.ImageSharp.PixelFormats
[MethodImpl(InliningOptions.ShortMethod)]
public static Rgba32 ParseHex(string hex)
Guard.NotNull(hex, nameof(hex));
if (!TryParseHex(hex, out Rgba32 rgba))
throw new ArgumentException("Hexadecimal string is not in the correct format.", nameof(hex));