I'm making a paint program using applets in Java, and I want to create some sort of color palette where the colors blend into each other, similar to this:

![enter image description here](https://i.stack.imgur.com/icMH5.jpg)

However, I'm having trouble understanding the correlation between the R, G, B, values and the X, Y coordinates for both the outer circular color palette, and the inner hue selecting palette.

Representation:

![enter image description here](https://i.stack.imgur.com/gUzGc.jpg)

![enter image description here](https://i.stack.imgur.com/afMH3.jpg)