Toon Shader appear to be have gray colour coming out, for the shadow When I tried to make toon shading, with diffuse bsdf, shader to RGB, color ramp, and material outputs nodes, it appears to be fine if there is no object covering it with shadow(with only light emit and create the shadow)

(the light is near the floor)
but when there is something blocking the object and create a shadow depend on where the light, it will appear with some gradient


(the light is behind something, causing the floor to have gradient)

(my render properties)
all object have the same nodes, only diffuse, shader, color ramp, and material output.
Go into the Render Properties tab, and under Shadow, turn off (un-check) &quot;Soft Shadows&quot;. Also, consider enabling high-bitdepth, and if the shadows have jagged edges, you can get rid of them by increasing the shadow-map Cube Size.