You need to learn about combining colours. Let's simplify the situation and say we have vec3 red = vec3(1.0, 0.0, 0.0)
and we want to mix it with vec3 grey=vec3(0.5, 0.5, 0.5)
There are numerous ways of doing this that yield different results. You can do maths operations on them; multiply, add, subtract. The simplest here is just to linearly interpolate between them which is inbuilt. Something like this (verboseness for clarity):
shader_type canvas_item;
uniform float slider = 0.0;
void fragment(){
vec3 red = vec3(1.0, 0.0, 0.0);
vec3 grey = vec3(0.5, 0.5, 0.5);
vec3 final_colour = mix(red, grey, slider);
COLOR = vec4(final_colour, 1.0);
}
So when you're slider is 0 it's red. When it's 1 it's grey.
I'd recommend you google "the book of shaders" and find the YT channel "the art of code". Hope this helps.
EDIT: forgot to say, to specifically make things monochrome to just need to take the mean of each colour. So COLOR = vec4(vec3(COLOR.r, COLOR.g, COLOR.b) / 3.0, 1.0);