Skip to main content
added 1 characters in body
Source Link
halirutan
  • 113.4k
  • 7
  • 266
  • 479

However, through a crash of my procedure, I found out that the number of colors in the schemes is limited.

This is not correct. The first indexed color scheme ashas many colors:

ColorData[1, "Range"]

(* {1, ∞, 1} *)

If you want to create your own, you could look at its InputForm

ColorData[1] // InputForm

(* ColorDataFunction[1, "Indexed", {1, Infinity, 1}, 
 (ToColor[Hue[N[FractionalPart[0.67 + (2*(#1 - 1))/GoldenRatio]], 
      0.6, 0.6], RGBColor] & )[Floor[#1 - 1, 1] + 1] & ] *)

and you see how they try to create many different values. You could simply adapt this and use it with one of the gradient schemes

With[{func = 
   ColorData["BrightBands"][
       N[FractionalPart[0.67 + (2*(#1 - 1))/GoldenRatio]]] & [
     Floor[#1 - 1, 1] + 1] &},
 Graphics@Table[{func[i], Rectangle[{i, 0}, {i + 1, 5}]}, {i, 1, 30}]
 ] 

Mathematica graphics

However, through a crash of my procedure, I found out that the number of colors in the schemes is limited.

This is not correct. The first indexed color scheme as many colors:

ColorData[1, "Range"]

(* {1, ∞, 1} *)

If you want to create your own, you could look at its InputForm

ColorData[1] // InputForm

(* ColorDataFunction[1, "Indexed", {1, Infinity, 1}, 
 (ToColor[Hue[N[FractionalPart[0.67 + (2*(#1 - 1))/GoldenRatio]], 
      0.6, 0.6], RGBColor] & )[Floor[#1 - 1, 1] + 1] & ] *)

and you see how they try to create many different values. You could simply adapt this and use it with one of the gradient schemes

With[{func = 
   ColorData["BrightBands"][
       N[FractionalPart[0.67 + (2*(#1 - 1))/GoldenRatio]]] & [
     Floor[#1 - 1, 1] + 1] &},
 Graphics@Table[{func[i], Rectangle[{i, 0}, {i + 1, 5}]}, {i, 1, 30}]
 ] 

Mathematica graphics

However, through a crash of my procedure, I found out that the number of colors in the schemes is limited.

This is not correct. The first indexed color scheme has many colors:

ColorData[1, "Range"]

(* {1, ∞, 1} *)

If you want to create your own, you could look at its InputForm

ColorData[1] // InputForm

(* ColorDataFunction[1, "Indexed", {1, Infinity, 1}, 
 (ToColor[Hue[N[FractionalPart[0.67 + (2*(#1 - 1))/GoldenRatio]], 
      0.6, 0.6], RGBColor] & )[Floor[#1 - 1, 1] + 1] & ] *)

and you see how they try to create many different values. You could simply adapt this and use it with one of the gradient schemes

With[{func = 
   ColorData["BrightBands"][
       N[FractionalPart[0.67 + (2*(#1 - 1))/GoldenRatio]]] & [
     Floor[#1 - 1, 1] + 1] &},
 Graphics@Table[{func[i], Rectangle[{i, 0}, {i + 1, 5}]}, {i, 1, 30}]
 ] 

Mathematica graphics

Source Link
halirutan
  • 113.4k
  • 7
  • 266
  • 479

However, through a crash of my procedure, I found out that the number of colors in the schemes is limited.

This is not correct. The first indexed color scheme as many colors:

ColorData[1, "Range"]

(* {1, ∞, 1} *)

If you want to create your own, you could look at its InputForm

ColorData[1] // InputForm

(* ColorDataFunction[1, "Indexed", {1, Infinity, 1}, 
 (ToColor[Hue[N[FractionalPart[0.67 + (2*(#1 - 1))/GoldenRatio]], 
      0.6, 0.6], RGBColor] & )[Floor[#1 - 1, 1] + 1] & ] *)

and you see how they try to create many different values. You could simply adapt this and use it with one of the gradient schemes

With[{func = 
   ColorData["BrightBands"][
       N[FractionalPart[0.67 + (2*(#1 - 1))/GoldenRatio]]] & [
     Floor[#1 - 1, 1] + 1] &},
 Graphics@Table[{func[i], Rectangle[{i, 0}, {i + 1, 5}]}, {i, 1, 30}]
 ] 

Mathematica graphics