Color values in the range [0-1] are supposed to be floats

See rgb_to_hex
This commit is contained in:
Olivier Berten 2023-07-03 19:23:51 +02:00 committed by Nick Hall
parent cbb0ed1bba
commit 53d32945d4

View File

@ -574,8 +574,8 @@ def get_contrast_color(color):
"""
yiq = (color[0]*299)+(color[1]*587)+(color[2]*114)
if (yiq < 500):
return (1, 1, 1) # 'white'
return (0, 0, 0) # 'black'
return (1.0, 1.0, 1.0) # 'white'
return (0.0, 0.0, 0.0) # 'black'
def get_link_color(context):
"""