I want to produce a 2d color gradient rectangle like the ones in the picture below on the right hand side. How can I do this in R? Using colorRamp or RColorBrewer or other functions/packages I can produce nice 1D dolor ramps. But how do I do this for 2D including several colors in the corners, like e.g. the upper right rectangle?

Color gradients

What I want to get is e.g. the following two gradient types:

enter image description here enter image description here

BTY: I completely forgot to mention that I found the above chart here (produced by Luca Fenu).

Edit
Report