def get_luminance(self):

        return clamp(round_int(0.299 * self.r + 0.587 * self.g + 0.114 * self.b), 0, 255)
Get percieved luminance.
dataset/ETHPy150Open facelessuser/ColorHelper/lib/rgba.py/RGBA.get_luminance