stop throwing exceptions for color validation

This commit is contained in:
2023-05-18 17:50:21 +02:00
parent f20d7af0c5
commit 82bc1e72c6
+1 -9
View File
@@ -26,15 +26,7 @@ namespace QuestPDF.Helpers
static bool IsColorValid(string color)
{
try
{
SKColor.Parse(color);
return true;
}
catch
{
return false;
}
return SKColor.TryParse(color, out _);
}
}
}