Thanks for making this - I customized it for my WIP to make the non-speaking sprites simply "shadowed". This is what I use:
if is_talking: # Apply the talking transformation trans.matrixcolor = IdentityMatrix() else: # Apply the not-talking transformation trans.matrixcolor = TintMatrix("#646464") * SaturationMatrix(1.0)