I am trying to manipulate/stylize the edges of shadows. What I mean by that is that I would like to split the transition of a shadow to non shadow area into different colours like so
Is either of this possible procedurally without hand painting it? I did the second version in photoshop. I've tried using the shader to rgb node with color ramps to get shadows that are slightly offset and then color them differently but it doesn't really work. Is there a way to do it? Possibly in compositing?