We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fcbf49 commit ae5afebCopy full SHA for ae5afeb
src/modulino/pixels.py
@@ -3,6 +3,12 @@
3
4
class ModulinoColor:
5
def __init__(self, r, g, b):
6
+ if r < 0 or r > 255:
7
+ raise ValueError(f"Red value {r} should be between 0 and 255")
8
+ if g < 0 or g > 255:
9
+ raise ValueError(f"Green value {g} should be between 0 and 255")
10
+ if b < 0 or b > 255:
11
+ raise ValueError(f"Blue value {b} should be between 0 and 255")
12
self.r = r
13
self.g = g
14
self.b = b
0 commit comments