Skip to content

Commit ac96c99

Browse files
committed
typeerror check colors
1 parent e4c016f commit ac96c99

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyhdx/support.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ def rgb_to_hex(rgb_a):
343343
rgba_array = rgb_a
344344
else:
345345
rgba_array = np.array(rgb_a)
346+
else:
347+
raise TypeError(f"Invalid type for 'rgb_a': {rgb_a}")
346348

347349
ints = rgba_array.astype(np.uint8).view(dtype=np.uint32).byteswap()
348350
a = base_v(ints // 2**8, 16)

0 commit comments

Comments
 (0)