First let's assume that I want to compare two discrete distributions $d_1$ and $d_2$, but that I am not interested in their absolute values. Rather, I am interested in knowing how these two distributions rank different values of their input random variable. In that case, it seems natural to transform them into rankings and use some measure of rank correlation, for example Kendall's $\tau$ instead of divergences or distances such as Kullback-Leibler or Jensen-Shannon.
However, I face a situation in which I need to compare two continuous distributions $p$ and $q$, but as in the previous case, I am not interested in the absolute values. I would thus like to define some comparison function $f(p,q)$ which would, for example, consider the red and blue distributions below to be equivalent (as if we were to discretize them, they would define the same ranking over their discretized domain).
Naturally, methods such as Kullback-Leibler or Jensen-shannon wouldn't be suitable for this task.
What is the best way to extend the notion of rank correlation to this case?