1

How can I get the rgb numbers for colors that show up in the colordata "pastel" so I can use them inside a regionplot? I am combining several regionplots and I would like each of the regionlots to be one color from the "Pastel" color scheme.

This thread Sunset Colors tells me how to get some of the colors but it would be helpful to be able to get the codes for all possible blends on a continuum.

datt = DataPaclets`ColorDataDump`getColorSchemeData["Pastel"][[5]]

{RGBColor[0.761959, 0.470832, 0.940597], 
 RGBColor[0.809695, 0.585618, 0.953269], 
 RGBColor[0.866514, 0.647659, 0.771795], 
 RGBColor[0.909422, 0.699383, 0.647465], 
 RGBColor[0.937061, 0.764486, 0.598975], 
 RGBColor[0.954654, 0.842244, 0.587209], 
 RGBColor[0.962197, 0.913524, 0.594117], 
 RGBColor[0.948179, 0.953299, 0.634088], 
 RGBColor[0.891128, 0.944422, 0.72627], 
 RGBColor[0.771259, 0.887462, 0.856246], 
 RGBColor[0.594516, 0.801371, 0.955499], 
 RGBColor[0.431296, 0.709773, 0.927077]}


Table[RegionPlot[
  x > 0, {x, series[5][[22, 2]]/10000, 
   series[5][[22, 2]]/10000 + series[14][[22, 2]]/10000}, {y, 0, -1}, 
  PlotStyle -> k, AspectRatio -> Automatic], {k, datt}]

enter image description here

Amatya
  • 6,888
  • 3
  • 26
  • 35

2 Answers2

9

You can get the RGB of of your chosen color by clicking on the "Pastel" panel.

ColorData[ "Pastel", "Panel"]

enter image description here

PlatoManiac
  • 14,723
  • 2
  • 42
  • 74
4

Use it as Colordata["Pastel"][x]:

Manipulate[
 Column[{ColorData["Pastel"], "Argument = " <> ToString[x], 
        Graphics[{FaceForm[ColorData["Pastel"][x]], Rectangle[]}]}], 
 {x, 0, 1}]

Mathematica graphics

So, if you like that color, just use it like this:

RegionPlot[x^2 + y^3 < 2, {x, -2, 2}, {y, -2, 2}, 
           PlotStyle -> ColorData["Pastel"][0.418]]

Mathematica graphics

Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453
  • Thanks Belisarius, that's very convenient form an implementation point of view. I will probably use your method in the end. – Amatya Dec 30 '13 at 13:40