Skip to content

Commit 9e53e23

Browse files
author
Colin Leroy-Mira
committed
Add test cases
1 parent 5718c2b commit 9e53e23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

digital_image_processing/dithering/burkes.py

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ def get_greyscale(cls, blue: int, green: int, red: int) -> float:
4040
"""
4141
>>> Burkes.get_greyscale(3, 4, 5)
4242
4.185
43+
>>> Burkes.get_greyscale(0, 0, 0)
44+
0.0
45+
>>> Burkes.get_greyscale(255, 255, 255)
46+
255.0
4347
"""
4448
return 0.114 * blue + 0.587 * green + 0.299 * red
4549

0 commit comments

Comments
 (0)