Accessing lighting information thru material nodes

Is it possible to access information about how much light a material is receiving through material nodes? There’s a node for color, normals, etc, but is there one for shadows or something similar? The closest workaround is baking ambient occlusion to a texture, but there should be a way to get this information through the materials editor.
If this doesn’t make sense, here’s an example. Say you wanted to have a material blue, unless it was in a shadow over a certain intensity, then it would change to red or change the texture or whatever. Is there a way to tell how dark shadows are at that point in space?

Never mind, diffuse/specular options should work.