Input number of colors and try to find the most decentralized combination.
For n=1, any color is OK.
For n=2, the 2 colors should have an euclidean distance of sqrt(255^2*3), such as [0 0 0] and [255 255 255].
For n=3, the 3 colors have 3 distances. We measure the smallest one, which should be sqrt(255^2*2). One possible combination may be [255 255 255;255 0 0;0 0 255].
For n=8, apparently we capture the 8 vertecies of the cube, the smallest distance is 255.
Then, more?
Your function should return a n×3 matrix with each row represent an RGB color.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers3
Suggested Problems
-
Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
253 Solvers
-
MatCAT - Reconstruct X from Its X-rays
151 Solvers
-
Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
162 Solvers
-
Split array into pieces according to corresponding array
60 Solvers
-
Height of a right-angled triangle
2072 Solvers
More from this Author14
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!