Question

Sorry for the bad title I don't really know how could I write it better. I want to create a colorpicker that's not very typical. There is the version where you can select the three vectors of HSB. It would be close to it but not at all. The main problem is why I don't use the usual colorpickers is that I have a very specific space to do it. I have 35 free objects that could be colored (these are filled circles with a black border) and not more. But I can place each object wherever I want. So how I imagine there would be a circle of 12-18 objects that are constats they would represent the HUE than when I select one the rest of the objects would be in the HUE circle and they would form a square. And why I call it tree: because you could select a color from the main circle than you get colors from that branch than you click on one of the colors in the got colors than you get colors from that color (but the clicked color is always part of the "zoomed" colors the best how you can imagine this like there is the HSB color space and in the first two clicks you select the HUE than you just zoom in the HSB color space than there is the two dimensional 101*101 S and B square and we zoom on the color. I really hope that you can understand me if not ask anything. And thank you for reading this long text.

Something like this:

Was it helpful?

Solution

  1. The first, must know what is equation of HSB Color. The Algorithm to find this is in this with name HSV.
  2. If you found, You can fill each color with choosen formula with hue you choosen and full saturation.
  3. Add listener of click for that circle.
  4. In listener, update the cicle inside with your choosen saturation and brighness. For example first row is sqaturation and brightness is column. Then in row 1 is no saturation, row 2 is half saturated(50) and row 3 is full saturated ones. The column 1 is the brightmost one(100) the 2 is half(50) and 3 is no brightness (0), for example.

Aclually it is not a tree, but a alternative approach for standard approach because it's more like that than tree.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top