map-machine/test/test_color.py
2021-05-29 15:20:04 +03:00

17 lines
366 B
Python

from colour import Color
from roentgen.color import is_bright
__author__: str = "Sergey Vartanov"
__email__: str = "me@enzet.ru"
def test_is_bright():
"""
Test detecting color brightness.
"""
assert is_bright(Color("white"))
assert is_bright(Color("yellow"))
assert not is_bright(Color("brown"))
assert not is_bright(Color("black"))