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

learn more… | top users | synonyms (2)

28
votes
4answers
5k views

Density plot on the surface of sphere

I would like to make density plots of a list of (size 2 or 3) spherical harmonics on the surface of a sphere. I'd like to plot it so that each element of that list is using a different color (red ...
38
votes
4answers
4k views

How to change the default ColorData used in Mathematica's Plot?

This question leads on from the recent question What are the standard colors for plots in Mathematica? There it was determined that the default color palette used by ...
8
votes
4answers
3k views

Coloring Points in a List Plot [duplicate]

Possible Duplicate: ListPlot with each point a different color and a legend bar I want to color the points in a list plot using a function of the (x,y) values. I tried this (example with ...
7
votes
1answer
3k views

Fixed color scale in multiple density plots

I think there should be a simple solution for my current problem, but neither StackOverflow (or the help of Mathematica) or Google have it. I have to plot multiple density plots with a color ...
4
votes
2answers
414 views

Coloring a shape according to a function

I would like to create a $2D$ shape, say an ellipse, where each point in the ellipse is colored according a RGB function, so at point ...
2
votes
1answer
437 views

White regions in DensityPlot — is this a bug with ColorFunctionScaling?

Is this a bug with ColorFunctionScaling? When I try to supply my own ColorFunction Mathematica seems to partially ignore it, ...
28
votes
1answer
397 views

Is there a way to access the (lexically) current colour inside Graphics?

Note that this is not a duplicate of the question over there. That one asks for a given point, while I'm asking about the lexical structure (which, of course, is not directly related to any point in ...
21
votes
2answers
2k views

How to access new colour schemes in version 10?

Many colour schemes and colour functions can be accessed using ColorData. Version 10 introduced new default colour schemes, and a new customization option using ...
20
votes
2answers
715 views

Blend code for built-in ColorData schemes

Hi I want to get a blend similar to "SunsetColors". To make those slight modifications, I would like to know the precise blend of that color scheme. My try: ...
6
votes
2answers
266 views

Formatting text through pattern matching

I am trying to format some text based on some patterns. ...
10
votes
4answers
1k views

Coloring Points in a Plot, based on their position in the list

Before I describe the question, I'd like to say that I've seen the excellent answers posted here but have not managed to get them to work for my own data. I have a list of values that I would like to ...
29
votes
3answers
669 views

A better “VisibleSpectrum” function?

Since ColorData["VisibleSpectrum"] is wrong, I would like to have a more accurate function to use. Can this information be extracted from Mathematica itself?
17
votes
2answers
400 views

Pattern that matches colors

Suppose I'm writing a function that takes a color as a parameter; for example: drawShape[color_] := Graphics[{Style[Disk[], color]}]; But if the caller inputs an ...
14
votes
3answers
863 views

Change the inner color of markers

I would like to have a marker with white as its inner color, to be able to make this kind of graph: If I use PlotMarkers -> Style["\[FilledSquare]", White], ...
16
votes
6answers
2k views

X-Y scatter plot with coloring dependent on Z value [duplicate]

I have an array of $(x,y,z)$ triples (array dimensions: N x 3), from which I can make a 2D scatterplot of $(x,y)$ values: ...
5
votes
4answers
181 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 colorschemes based on two ranges of the data. This is my attempt. ...
31
votes
4answers
1k views

Is there an easy way to use Matteo Niccoli's perceptual color maps for 2D plots in Mathematica?

I have been using the ubiquitous Jet color palette for 2D plots for some time now, and don't really care for it. Then I came across the series of blog posts, The rainbow is dead...long live the ...
30
votes
1answer
3k views

The correct way to linearize colorspace before resizing, blurring etc

There was an interesting discussion on MathGroups dealing with the fact that image-processing functions in Mathematica (and many other software, including Adobe Photoshop) work with RGB, Grayscale ...
23
votes
4answers
1k views

Create colour with given lightness value

How can I create a colour of my chosen hue with a given fixed lightness level? For example, how can I create a reddish colour, col, so that ...
16
votes
1answer
557 views

Is it possible to insert new colour schemes into ColorData?

Because of the standards in my field, for many plots I need to use (or at least end up using) rather narrowly defined colour schemes, and in particular the Matlab "Jet" scheme, which is well described ...
22
votes
2answers
4k views

What are the standard colors for plots in Mathematica 10? [duplicate]

Mathematica 10 release appears to have changed the default styling of plots: the most visible changes are thicker lines and different default colors. Thus, answers to this stackoverflow question are ...
17
votes
2answers
4k views

How to save plots in grayscale

As sophomoric as this question seems, how should I save plots in grayscale in Mathematica? I generally like eps images for their scalability and I use ghostscript or other third party perl scripts ...
11
votes
2answers
481 views

How can I prevent ColorFunction from disabling antialiasing in graphics?

When I use ColorFunction, the appearance of my plots is ruined, changing from this which has the normal smooth lines and antialiased fonts, to this in which ...
12
votes
2answers
1k views

Using a ListDensityPlot to map color onto a ListPlot3D graph

I have a 3 column list of data points. The first two columns correspond to x and y coordinates, with data points creating a surface in the z direction from column 3. This gives me a nice wavy ...
6
votes
1answer
199 views

Is it possible to render Graphics with more than “Byte” bitdepth?

I wonder is it possible to render Graphics in Mathematica with bitdepth higher than "Byte" which is the maximum bitdepth ...
1
vote
1answer
429 views

Invert Colors Stylesheet White on Black

There have been a couple studies done that showed that white text on a black background increase recall of data. Although this is certainly debatable how might I invert the colors of Notebook font ...
3
votes
2answers
141 views

Set the scale in ColorFunction

The following plot (A) ListLinePlot[{0,1,2,3},ColorFunction->"TemperatureMap"] goes from blue to read. The following plot (B) ...
20
votes
3answers
1k views

Convert spectral distribution to RGB color

Presume I have a spectrum as a function of wavelength (an example being the blackbody spectrum): I want to convert that to a single RGB color to display on-screen, i.e. the "color" of that object ...
15
votes
6answers
2k views

How to find major color in a picture?

I want to find the major color (the color which appears most often) in a picture and do some analysis later. For example, if I have this picture: What I want to do is find out that gray, red, ...
22
votes
5answers
1k views

Morphing Graphics, color and location

I would like to make a small animation : 1-We start with a random distribution of gray points : ...
12
votes
2answers
421 views

Modify existing color scheme

I am using the "TemperatureMap" color scheme for image processing. How can I set the lowest color value to Black? Generally ...
36
votes
6answers
2k views

ColorData[“VisibleSpectrum”] is wrong?

I am trying to visualize the visible spectrum using the built-in ColorData["VisibleSpectrum"] function which "colors based on light wavelength in nanometers". But I ...
21
votes
10answers
2k views

How to convert a hex color string to RGBColor?

For example: "#FF8000". How could I convert it to RGBColor or Hue?
14
votes
3answers
1k views

On coloring the faces of a surface differently with parameter-dependent colors

Old versions of Mathematica ($VersionNumber < 6) supported a particular syntax of ParametricPlot3D[] that allowed for ...
11
votes
6answers
572 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 ...
16
votes
2answers
733 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: ...
9
votes
4answers
637 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, ...
14
votes
1answer
192 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: ...
10
votes
4answers
4k views

How to convert rgb to YCbCr?

I looked at ColorConvert, but haven't found a relevant option. Is there a built-in function do this?
3
votes
2answers
2k views

Define a color function using Piecewise

How can I define a ColorFunction for my ContourPlot using Piecewise? For example after ...
14
votes
4answers
1k 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 ...
10
votes
2answers
2k views

problem with coloring spherical harmonics

I want to color a spherical harmonics. So I write as follows. ...
10
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 ...
8
votes
1answer
573 views

Discrete coloring in Plots

I would like to have a plot that is filled to the axis with Green if the y value is greater than 10, and ...
6
votes
6answers
2k views

How do I fill in a circle made by ParametricPlot with one solid color?

I have a very simple question but I am new with Mathematica. I made a circle on a parametric plot and I made the line black. I want to make the inside of the circle on the parametric plot red. So the ...
6
votes
2answers
466 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
471 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
2answers
741 views

What is the default ColorFunction for 3D plots?

This should be a really simple question, but it isn't in the documentation for some perverse reason. I like the default ColorFunction that Mathematica uses for ...
1
vote
2answers
260 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 ...
11
votes
1answer
237 views

What is the default ColorFunction for Image3D?

What is the default ColorFunction for Image3D? I find it a bit confusing that the most intense colour is not shown where the ...