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

learn more… | top users | synonyms (2)

1
vote
1answer
43 views

DensityPlot colours symmetric around zero

I have some function of two variables (which happens to be the error in some approximation I'm interested in). I'd like to get a density plot of the function, such that in regions when the function is ...
0
votes
1answer
52 views
1
vote
2answers
73 views

Controlling colors of points in ListPlot

I have a collection of points I want to plot using ListPlot[]. I would like each individual point to be a certain color depending on a key value that is based on a list separate from the points. As a ...
2
votes
1answer
39 views

Change ColorScheme of DistributionChart

The "ColorScheme"of a DistributionChart can be changed using the ChartElementFunction like in the following example: ...
2
votes
0answers
23 views

Calculating number of discernible colors in CIE La*b* space

How can Lab space be easily splitted into unity cubes and determined number of cubes that colours of certain image occupy?
3
votes
0answers
75 views

Is there any faster implementation of DominantColors?

The function DominantColors is a simple function but runs incredibly slow when the number n of dominant colors to find is large - it is currently the biggest bottleneck in my code: ...
0
votes
2answers
63 views

How to Fill ContourPlot

Given a contour plot such as function = Cos[c] + Cos[a] pltc = ContourPlot[function == 1/2, {a, 0, 4 Pi}, {c, 0, 4 Pi}]; How can I color the regions in which ...
2
votes
2answers
100 views

Make a colored ListPlot

Basically I have a set of 3D points, such as {3,4,3} or {4,1,4}. Instead of plotting the points in a 3D space, I want to plot the x,y coordinates of the points on the 2D plane and use the z coordinate ...
0
votes
1answer
34 views

Strange output of ColorFunction

In v10.0.2, compare the following two outputs: Plot3D[x^2 + y^2, {x, -2, 2}, {y, -2, 2}, ColorFunction -> (Hue[Sqrt[#1^2 + #2^2]] &)] ...
0
votes
1answer
50 views

Coloring circles based on radius

I have a list of ellipses with x and centroid, orientation, and major diameter and minor diameter. I currently have them overlaid on an image in red but what I would like is to be able to colour them ...
2
votes
2answers
693 views

How do I find the average color of an image?

It sounds so simple to do, but the best solution I've found so far is by using the MeanFilter function, which isn't really feasible on large images. Can anyone help ...
1
vote
2answers
114 views

Using Specularity effects and ColorFunction in Plot3d

I'd like to reproduce the 3d surface of the attached image . What I'm interested in, is the light reflection at the basis of the surface and the rainbowlike color. I use Plot3d and colorfunction in ...
0
votes
0answers
48 views

ContourPlot color problems

I tried to use contourplot to a 2D fucntion with rescaled color, the code is given below ...
0
votes
1answer
27 views

Manually choosing colors in ListPlot

I have a ListPlot of 4 data sets (tables) and I want to manually choose what color each one has. data1 = Table1 data2 = Table2 etc. and then ...
1
vote
2answers
61 views
0
votes
2answers
42 views

How do I color an Image generated from data such that one range of values is one color gradient and the others another color gradient [closed]

I can generate a Gray scale Image from some data that I collect. However I am trying to figure out how to generate the image with two color gradients or color scales based on the value. For example ...
2
votes
2answers
51 views

Can i change AutoStyles colors for undefined variables?

I want to change from blue to red the color of the undefined variables; but only for the current Notebook
14
votes
2answers
356 views

White balance correction with Mathematica

Does Mathematica include a function to correct the white balance of an image? ImageAdjust would seem to be the first go-to choice, but I haven't found a way to ...
5
votes
3answers
172 views

mixing color of individual parts of a function in DensityPlot

I have a function which is a sum of three terms and I want to plot it in a DensityPlot. However, I would like that the ColorFunction would be the RGBColor resulting of the mixed R color corresponding ...
2
votes
1answer
61 views

Change the colors of individual atoms in a .mol or XYZ file

Similar to (Changing the atom color for plotting xyz-files), I want to take a molecule and then simply change the colors of individual atoms. I don't want to change all atoms of a type to a color ...
4
votes
1answer
63 views

What are all the Properties that ColorData supports?

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

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

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: ...
5
votes
4answers
153 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. ...
0
votes
0answers
13 views

How to converrt RGB to YCbCr [duplicate]

While converting rgb to Ycbcr, do we get values as floating point numbers? I would like to have Y, Cb, Cr values as integers. Is it possible?
6
votes
2answers
146 views

Color lines by angle

I would like to color some lines according to the following color function: ...
1
vote
1answer
67 views

Piecewise ColorFunction for Plot3D

I want to make a 3D plot where the ColorFunction is different depending on whether the function value is positive or negative. I know how to do the following: ...
3
votes
2answers
58 views

How do I apply a ColorDataFunction[] to a grayscale image? [duplicate]

Suppose I have a 2D array im of real values between 0 and 1, representing a grayscale image. I can turn im into an image very ...
1
vote
1answer
93 views

Adjusting contrast of a color scale with ListDensityPlot

I am using ListDensityPlot to plot data of the form {{x1,y1,z1},{x2,y2,z2}, …}. It results in the plot shown below. But I'd like to adjust the color scale contrast to better show the variations in ...
16
votes
2answers
399 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?
3
votes
3answers
356 views

How to create a Disk with smoothly changing coloring?

I want to have a disk. But this disk shouldn't have a fixed color; instead, I'd like it's color to fade smoothly. Until now, I came up with two ideas how to achieve this. Idea #1: ...
3
votes
2answers
301 views

How do I show only the intrinsic color of 3D polygons?

System: Mathematica 9, Windows 7. I want to assign a polygon a color in such a way that it is rendered in that color irrespective of any ambient light sources. In other words I want Yellow to be ...
2
votes
2answers
45 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 ...
0
votes
0answers
38 views

Coloring all elements in prime ordered sets amongst a set of sets

So I have a set of sets. I want only those sets whose order amongst the sets plus one is prime to be colored (all the same, anything but the standard black). Any ideas? ArrayPlot[{{1}, {1, 1}, {1, 1, ...
3
votes
1answer
95 views

The default ColorFunction of DensityPlot before v10?

The default ColorFunction of Plot, Plot3D before v10 is respectively mentioned here and ...
2
votes
2answers
69 views

How to convert a coloured image according to the colorfunction I defined?

I got an image from a website which follows the colorfunction "Rainbow", e.g. ...
1
vote
2answers
80 views

Adding colors to objects in a loop

I'm just starting out in Mathematica and still learning the ropes. I'm making a "necklace" which is a circle with squares around it. The following works: ...
3
votes
1answer
137 views

How can I combine two color schemes for plotting?

I want to use ListContourPlot to display all negative values using one colorscheme and all positive values using another color scheme. This question Define a color function using Piecewise gives some ...
3
votes
2answers
511 views

Color a Function by its Derivative

Mathematica's ColorFunction seems to struggle with coloring a function "y" by its derivative D[y,x]. This is a seemingly simple task, but Mathematica can't handle it. While I can certainly evaluate ...
1
vote
1answer
110 views

How to apply two kinds of Plot styles in single graph

My version is 9.0 I want to apply ColorData and Line Width styles at the same time, like the ColorTheme Function new in 10.0, but there is always errors. Codes under here: ...
1
vote
1answer
167 views

Plot multiple solutions of a system of differential equations with different values of constant c by using NDsolve

I am traying to solve system of differential equations with different values of constant c then plot the solution with different values of the constant c. where c= 2.2758, 2.04822, 1.82064, 1.59306, ...
2
votes
0answers
53 views

Background color does not display in InputField unless Appearance option is also specified

I get the same behavior for v10.1.0, v.10.0.2 and v.9 with OS X (10.9.5) : No background color is displayed in InputField if I just set properly the option. For ...
2
votes
0answers
93 views

How can I transfer colors from first image into second image? [duplicate]

How can I transfer colors from first image into second image, where every object from the first image should take the same object's color from first image. This images are only an example. this is ...
3
votes
4answers
152 views

ReplaceImageValue and ReplacePixelValue extremely slow

I have a grey scale image: and I am doing the following: bin = Binarize[image, 0.18] ...
3
votes
2answers
75 views

BarLegend using Function that uses Blend

I'm sorry if this is a duplicate, but I don't even know how to look for it. I had this line of code that worked on a Notebook I wrote on Mathematica 9.0: ...
3
votes
1answer
147 views

How can I pick a color from a ColorMap and colorize selected image pixels with this color

I have a binarized image and would like to set pixel values which are 1 to a certain (any) color picked from ColorData["TemperatureMap"] and 0 to another color of TemperatureMap. How can I do that? ...
11
votes
2answers
345 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 ...
1
vote
2answers
131 views

Colorizing thresholded images with different colors

I am switching from IDL (from exelis) to Mathematica and want to do the following: thersholding a image (all values above a certain threshold are set 1, the rest is 0 ) colorizing the thresholded ...
2
votes
2answers
112 views

ListPlot a bunch of points that changes colour

I have a list of points: r = Range[-Pi/2, Pi/2, Pi/8]; angles = (c = Tuples[r, 2]) and a list of numbers which will determine the colour of the points above: ...
4
votes
2answers
144 views

Match colors to plot themes

How do I get the colors to match the plot theme when I use a PlotLegend that is separate to the plots? I have had a look at How to access new colour schemes in version 10? but can't seem to find what ...
2
votes
1answer
61 views

Inconsistent behavior in ColorFunctionScaling of BarLegend in v10.0.1

I find the ColorFunction in BarLegend behaves very weirdly: Force rescaling from 0 to 1 For example: ...