@factual-fantasy
i'd like to add that the shadow color isnt necessarily dictated entirely by the primary light source, but the bounce light! so for the example of a sunny environment, the reason the shadows are blue are because of the light from the blue sky reflects across the environment; but, if the character were to be under tree cover, the bounce light would be coming from the leaves and thus the shadow would look greener.
Yee yee!!! You got it right on the nose!
Bounce light is something I didn't cover but I adore it!
Gotta work on my bounce light 💪
If you want to do it manually instead of via layer effects and are doing digital art, then look at the R,G,B values for the colors you're working with a little bit. If you have a pure red object in cyan (B+G) lighting, it's actually going to look gray or even black because the lighting doesn't have a red component. (You can see this effect in videos showing how colored objects change appearance with depth in the ocean!) The closer your object color matches the lighting's position on the color wheel (including what's bounced), the more likely it is to be fairly close to its "default" color.
To achieve this effect in practice, I find it easiest to work from the light source as a base. I might inch the hue slider a bit towards the object color if I am okay with there being a range of colors in my light source (this is most often the case, otherwise it's monochrome and not interesting in the way we're after here), I will inch my hue just a tad in the direction of the object, and I will knock the object color towards the grays to compensate the rest of the way. If the object color is very different from the light source, it's going to get more gray and less hue shift from the light source, while an object that is closer to the light source ranges will get to be closer to its original hue and less gray.
For example, if I have a red object in cyan light, I'm not going to do much of anything to the hue since they're on opposite sides of the wheel and instead I will just drop the red to gray. If it's a very saturated red it's going to be a darker gray. If I have a yellow object, though, I'll inch the hue from cyan to maybe something a bit greener, and I'll only drop the saturation a little bit. It'll look strange if you're just starting out, but once you get more colors in it will be more cohesive. They are relative to one another, after all!
Tl;dr Most solid colored objects by and large scatter light as opposed to transmitting or emitting it, which means that they are responding to colors in the light source. If you don't have a suitably matching color in your source, your object won't respond by being the color you expect it to!
Final note, it's worth pointing out that this is true in "default" white (full-spectrum) sunlight as well, but it just so happens that full spectrum means it's got every visible wavelength in it, so there can be no mismatch between your object color and what's available from your light source!
























