diff --git a/Lib/fontTools/ttLib/tables/C_P_A_L_.py b/Lib/fontTools/ttLib/tables/C_P_A_L_.py index a7b4ad2bb..22ef0623d 100644 --- a/Lib/fontTools/ttLib/tables/C_P_A_L_.py +++ b/Lib/fontTools/ttLib/tables/C_P_A_L_.py @@ -255,3 +255,7 @@ class Color(namedtuple("Color", "blue green red alpha")): blue = int(value[4:6], 16) alpha = int(value[6:8], 16) if len (value) >= 8 else 0xFF return cls(red=red, green=green, blue=blue, alpha=alpha) + + @classmethod + def fromRGBA(cls, red, green, blue, alpha): + return cls(red=red, green=green, blue=blue, alpha=alpha)