# The curious case of BrightBands ColorData

Posted 9 months ago
1280 Views
|
4 Replies
|
3 Total Likes
|
4 Replies
Sort By:
Posted 9 months ago
 Is this really where the divisions are? How did you extract that data?
Posted 9 months ago
 Hi Adam, I was perusing the ColorData schemes for a project and stumbled onto the partitions of these hues not being located at 6ths. So I decided to make an illustration of it and succeeded with some help from Hans Milton in this thread. To find the discontinuities I employed a telescoping algorithm to 1st determine the numerical resolution of the data, and then telescoped onto the locations. I've no idea why the data are this way - perhaps just some concatenations or generated from a different color coordinate system. There is at least one more like it in that collection.
 Very neat! I thoroughly enjoyed writing this code changeover[test_,start_,step_]:={start,step}//.{x_,y_}:>If[test[x+y],{x+y,y},{x,y/2.}] exhibitchanges[listofchangesepsilons_]:=(ColorData["BrightBands"]@#&/@ {First@#,First@#+$MachineEpsilon})&/@listofchangesepsilons Table[changeover[ EuclideanDistance@Delete[List@@ColorData["BrightBands"]@#&/@{#,i/6+.05},0]>.3&, i/6-.05,.05],{i,5}] exhibitchanges@% which agrees with your values (to within$10^{-18}\$).