Message Boards Message Boards

1
|
3744 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

The curious case of BrightBands ColorData

Posted 3 years ago

POSTED BY: Richard Frost
4 Replies

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}$).

POSTED BY: Adam Mendenhall

Wow, that's compact. Thank you for the programming insight. :)

POSTED BY: Richard Frost

Is this really where the divisions are? How did you extract that data?

POSTED BY: Adam Mendenhall

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.

POSTED BY: Richard Frost
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract