fixed automatic text color (was not working for some colors)