Browse Source

Fix: Correct error message to display the input hex string in ColorParser

Marcin Ziąbek 6 months ago
parent
commit
128ff34755
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/QuestPDF/Helpers/ColorParser.cs

+ 1 - 1
Source/QuestPDF/Helpers/ColorParser.cs

@@ -14,7 +14,7 @@ static class ColorParser
         if (!TryParseColorHex(hexString, out var color))
         {
             throw new ArgumentException(
-                $"The provided value '{color}' is not a valid hex color. " +
+                $"The provided value '{hexString}' is not a valid hex color. " +
                 "The following formats are supported: #RGB, #ARGB, #RRGGBB, #AARRGGBB. " +
                 "The hash sign is optional so the following formats are also valid: RGB, ARGB, RRGGBB, AARRGGBB. " +
                 "For example #FF8800 is a solid orange color, while #20CF is a barely visible aqua color.",