mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-23 14:06:23 +02:00
20 lines
394 B
Python
20 lines
394 B
Python
"""
|
|
Test color functions.
|
|
"""
|
|
from colour import Color
|
|
|
|
from roentgen.color import is_bright
|
|
|
|
__author__ = "Sergey Vartanov"
|
|
__email__ = "me@enzet.ru"
|
|
|
|
|
|
def test_is_bright() -> None:
|
|
"""
|
|
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"))
|
|
|