Add reference to the greyscaling formula

This commit is contained in:
Colin Leroy-Mira 2023-07-29 18:55:27 +02:00
parent 9e53e23261
commit e5dfb1890e

View File

@ -45,6 +45,11 @@ class Burkes:
>>> Burkes.get_greyscale(255, 255, 255)
255.0
"""
"""
Formula from https://en.wikipedia.org/wiki/HSL_and_HSV
cf Lightness section, and Fig 13c.
We use the first of four possible.
"""
return 0.114 * blue + 0.587 * green + 0.299 * red
def process(self) -> None: