Functional color to gray script