Is it consistent that there are regular cardinals $\kappa < \lambda$, such that $\lambda$ is a successor cardinal and for every coloring $d\colon[\lambda]^2\to\kappa$ there is some $A\subseteq\lambda$ of cardinality $\lambda$ and $\eta < \kappa$ such that $\forall x,y\in A$, $d(x,y)< \eta$?
If $\lambda\nrightarrow[\lambda]^2_\lambda$ then there is no such $\kappa<\lambda$: modify the coloring that witnesses this by defining it to be $0$ on pairs of ordinals sent to values above $\kappa$. (The original coloring takes on all values on any unbounded subset of $\lambda$, hence the modified coloring takes on all values below $\kappa$ on such a set.)
This rules out $\lambda$ being successor of regular (in fact, it rules out $\lambda$ having a non-reflecting stationary set by a result of Todorcevic).
For successor of singular, the question of whether $\lambda\nrightarrow[\lambda]^2_\lambda$ can fail is open.
What you ask follows if $\lambda$ is a Jonsson successor of singular, as the failure of your condition at successor of singular gives a Jonsson algebra.
If you demand that your condition applies to colorings of finite subsets of $\lambda$, then you end up with something equivalent to $\lambda$ being Jonsson.