Questions on the color models, schemes, named colors and color functions supported by Mathematica.

learn more… | top users | synonyms (2)

19
votes
3answers
3k views

Filtering pixels of a certain color

What is the best way to filter an image so that only the pixels close to a certain color are left? I've downloaded some satellite images from the web where a specific pixel color corresponds to a ...
11
votes
4answers
2k views

Discrete ColorData scheme with n colors?

I am trying to visualize a problem I am working on. For this, I need $n$ distinct colors which are preferably easy to distinguish. (Obviously, the higher the $n$ is, the harder it is to distinguish ...
11
votes
6answers
642 views

Overlapping Red and Green ArrayPlots to show yellow intersections

Let's say I have two ArrayPlot[]s. One is in redscale and the other is in greenscale, such that the lowest value is white and the highest value is pure red or green....
10
votes
6answers
314 views

Coloring an image with two Color schemes based on a Range

I would like to color an image generated from some data, using two color schemes based on two ranges of the data. This is my attempt: ...
16
votes
2answers
874 views

Exporting a dashed plot with a color gradient to a vector graphics format ruins the dashing

When exporting a dashed plot with a color gradient to a vector graphics format such as EPS or PDF, the dashing is partly ruined. For example, this command: ...
6
votes
2answers
145 views

RGBColor, ColorSlider and ColorSetter

A single RGBColor expression displays as a little square, showing the color. I just found that this little square is both a tooltip and a button. It seems to be new ...
15
votes
1answer
214 views

Major slowdown when using a ColorFunction with more than one named scheme

Problem remains in 10.1 Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example. First a color function using two different named gradient schemes: ...
14
votes
4answers
3k views

How can I change the color of the bar in a ProgressIndicator?

I want to change the color of the progress bar in a ProgressIndicator. I want the progress bar to be red instead of green. For this purpose I wrote the following ...
9
votes
4answers
673 views

Color change of area under a curve

I am trying to set a graph to show the value of the equity of an investment based on whether the portfolio is invested or in cash. I tried using the ColorFunction, ...
5
votes
2answers
422 views

How can I create an interactive ColorFunction using Manipulate?

I am trying to specify my own colors and scaling for the ColorFunction in ListDensityPlot. I have several lists of 2D values ...
4
votes
3answers
1k views

Define a color function based on color samples obtained from ColorBrewer

I am quite new to Mathematica and I am searching for a way to create a smooth colormap based on the samples given by ColorBrewer. Is it possible to create a interpolated function from those sample ...
16
votes
1answer
527 views

Is ColorDistance symmetric?

Is the function ColorDistance symmetric, i.e. is it always true that ColorDistance[a,b] == ColorDistance[b,a], as use of the ...
15
votes
4answers
2k views

How to change element color in Periodic Table?

The command ColorData["Atoms", "Panel"] generates a periodic table. As I don't want to reinvent the wheel, I asked myself how to change the color of each cell ...
11
votes
4answers
1k views

Height-dependent filling color in 3D Data Plots

I would like to have the filling of my ListPlot3D display the same color than the one applied to the data. This question makes sense only in the case of conditional coloring of data (according to ...
9
votes
3answers
479 views

Changing the atom color for plotting xyz-files

Mathematica takes the standard color code for atoms when plotting an *.xyz file, but I want to customize the color for the specific atoms. I really become desperate as I did not get it so far. ...
5
votes
2answers
611 views

How to extract RGB arguments as a list

Although the following lines of code work fine they are very awkward. My questions are below a = RGBColor[1, 0, 0] b = RGBColor[0, 1, 0] Is there a more compact ...
10
votes
2answers
3k views

problem with coloring spherical harmonics

I want to color a spherical harmonics. So I write as follows. ...
7
votes
1answer
179 views

Can you make the new “Choose color scheme” helper larger?

Mathematica 10 has a cool new "color data chooser" feature: My question is: Can you make that window larger? Right now, I can only see 3-4 color schemes at once, even though all 51 gradients would ...
7
votes
3answers
800 views

Color function doesn't span the whole color range in MatrixPlot

In matrix visualization, for instance, MatrixPlot[{{1, 2}, {3, 4}}, PlotRangePadding -> 0, ColorFunction -> "Rainbow"] the color map does not cover the ...
6
votes
2answers
525 views

Monochrome PNG (and GIF) Export

Is there a way to Export expressions to a monochrome PNG? I have tried the ColorQuantize function which is mentioned in ...
5
votes
1answer
660 views

Apply color function to matrix plot

I want to apply the following color rules to a large table of numbers. I have extracted a part of the table to use as an example. I would like to assign 5 different colors to 5 different ranges of ...
5
votes
1answer
1k views

ListContourPlot-ColorFunction

How can I use ONLY the central 90% of the spectrum, not the whole range? For example, I do not like to see the lowest values in purple, but in deep blue color. ...
3
votes
2answers
79 views

Coloring specific elements of sets with a prime modified order in an array plot

I have a set of sets: {{1}, {0}, {1, 1}, {0}, {1, 0, 1}, {0}, {1, 1, 1, 1}, {0}, {1, 0, 0, 0, 1}} I’m seeking to apply a color rule to only every other set, starting from the first (from left to ...
1
vote
2answers
303 views

How to blend some colors on a curve

I need to define a color gradient on a 3D curve, but I'm having some problems with this. Suppose we have a 3D curve defined as a parametric function of some real variable ...
5
votes
1answer
336 views

How can I colorize an imported model?

How can I colorize an imported model from for example 3ds max? I'm trying to find the way to colorize a 3D plot from an imported model with something like this: ...
4
votes
1answer
456 views

Creating multicolored meshed plots (connected scatter plots) using ListPlot

I would like to make colored scatter plots where the dots are connected by lines. I have tried the following, using Joined->True to connect the dots and ...
4
votes
1answer
110 views

What are all the Properties that ColorData supports?

The documentation for ColorData reads: Possible properties in ColorData["scheme","property"] include: ...
4
votes
1answer
373 views

Visualization of Gaussian Curvature

I need to visualize Gaussian Curvature of a parametric surface. There is a solution in this math.SE post. However, I'm not sure its working because when I draw a sphere it's all white, but it should ...
3
votes
2answers
2k views

2D ListPlot with separate color function

Suppose a data array of the form {{x1,y1,z1},{x2,y2,z2}...}, is it possible to use ListPlot where x,y specify the point position ...
3
votes
2answers
639 views

Color of a plane in Contourplot3D

I have the following code example: ...
3
votes
1answer
62 views

MatrixPlot ignores ColorFunction for 0 matrices [duplicate]

I noticed that when plotting a matrix with custom color function there seems to be a special behavior for matrices with just 0's. In this case the plot is simply white. If there is one non-zero ...
3
votes
2answers
166 views

ParametricPlot3D colorfunction for a specific region of an object

I have created a 3D parametric plot of an oblate spheroid, and I want to apply "TemperatureMap" as a colorfunction to its surface as a gradient in the Z direction. However, I only want to apply this ...
2
votes
2answers
190 views

How can I remove edges from my DiscretePlot?

By default, DiscretePlot displays "edges" along the sides and, prominently, align the top when ExtentSize -> Full is set. For ...
2
votes
2answers
175 views

Color points in ListPointPlot3D

I have some 3d points with coordinates and a value assigned to each point. I want to plot the points and depending on the value use a different color. I have tried to use the answer in ListPlot3D - ...
1
vote
2answers
114 views

Specify the color of each residue in a protein (PDB)?

I'm importing a *.pdb file containing a single protein. Mathematica automatically produces a plot of the protein. I want to specify the color of each residue independently, in this plot. Is this ...
0
votes
1answer
970 views

Use selfdefined ColorFunction to encode z dimension with predefined limits

In my last question we defined a colorfunction cf. Now I want to use this ColorFunction for a number of different plots (...
19
votes
3answers
3k views

Mathematica color schemes for the colorblind

Does Mathematica have a graphics option that makes plots intelligible for people with colorblindness?
26
votes
3answers
2k views

How to change ColorFunction after plotting

Say I have a plot like plot = DensityPlot[ Exp[-((x-5)^2+(y-5)^2)/5^2], {x, 0, 10}, {y, 0, 10}, PlotRange -> {0,1} ] Is there a way to ...
20
votes
4answers
762 views

How can I get the color of overlapping disks to be equal in any order?

When Graphics is used, necessarily the objects come in order. This affects which ones obscure others. When Opacity is not 1, it also affects the color. I would like the color of overlaps to depend ...
13
votes
4answers
6k views

How to change default notebook background color?

How does one change the default notebook background color?
13
votes
4answers
566 views

Quirk in VertexColors interpolation when displaying Polygon

When using VertexColors, the docs state: The interior of the polygon is colored by interpolating between the colors specified by ...
3
votes
1answer
331 views

How can I create a colour image using raw black and white data? (FITS data cube)

I have a data cube containing pictures of a galaxy across a thousand wavelengths. I want to take the data for the image slides in the red and blue parts of the spectrum, and have them represented in ...
19
votes
1answer
556 views

Color scheme used by Colorize?

The Colorize function is often used to display the results produced by MorphologicalComponents: ...
12
votes
3answers
556 views

How to speed up Colorize

I have a list of about 500 images similar to the following: A = Import["http://i.stack.imgur.com/1bV4O.png"] ...
10
votes
2answers
1k views

ColorFunction in Histogram[]

Let's say I have a Histogram: Histogram[RandomVariate[NormalDistribution[10, 2], 500]] and I want the bars positioned to ...
18
votes
1answer
299 views

Color degrades when using Copy As Bitmap

I have discovered a problem that affects my use of Mathematica. When I use the menu command Edit > Copy As > Bitmap the colors in the copy are subtly degraded. To make this more apparent I copied ...
15
votes
4answers
881 views

How can I create a ColorFunction using Blend?

As shown below, I am trying to find a cool way to show some variance weighted deviation from the mean. There are 10 attributes that I compute the distance for. How can I add a color function such ...
13
votes
3answers
1k views

How can I convert colors to grayscale?

I want to change the above colored plot into a grayscale plot. I have tried this: CCGray[pic_?ImageQ] := Module[{}, ColorConvert[pic, "GrayScale"]]; but it doesn'...
11
votes
2answers
7k views

Use different ColorFunction for each function plotted

When plotting two curves on one plot, you can specify different colors for each function: Plot[{Sin@x, Cos@x}, {x, 0, 4π}, PlotStyle -> {Red, Blue}] To ...
10
votes
0answers
224 views

Break[] inside ColorFunction

f[x_?NumericQ]:= (Do[Break[],{i,1,2}];x) Plot[x,{x,0,1},ColorFunction->(ColorData["Rainbow"][f[#]]&)] Break::nofwd: No enclosing For, While, or Do found ...