Some color pipeline fixes + an autotest for color
See the commits for details.
The autotest just checks if the pipeline matches the shader, but as we already have a bunch of tests that the pipeline gets correct results, we implicitly also test if the shader does everything right.