Adjusted the type signatures of grayscale functions.