InvalidColorError(text)
Source¶
Bases: NumdaplotError
Raised when the text of a CustomColor is not # followed by six hexadecimal digits.
Added in version 0.1.0
Parameters:
-
text(str)The rejected text.
Attributes:
-
textThe rejected text.
Examples:
import numdaplot as ndp
try:
ndp.CustomColor("#ff88")
except ndp.InvalidColorError as error:
print(error)
# Expected a color written as #rrggbb, got '#ff88'.