Tag Info

Hot answers tagged

14

myAtoms = {"H", "Li", "Na"}; defCols = myAtoms /. ColorData["Atoms", "ColorRules"]; newCols = {Pink, Yellow, LightBlue}; ColorData["Atoms", "Panel"] /. Thread[defCols -> newCols] Edit: Changing the font color isn't related to the ColorRules, but to the special formatting used by the Panel. So it's cumbersome, but you can see that Mma uses a similar ...


12

I know you said you didn't want to reinvent the wheel, but sometimes, it's fun to do so. The code below creates a palette with a Periodic Table and a few buttons to make useful tool tips. It shows how one might change the colors based on properties grabbed from ElementData. Note that this code was written for version 9, and if you wish to use it in ...


11

I got my CIE color matching functions from here. These are the CIE 1931 2-deg, XYZ CMFs modified by Judd (1951) and Vos (1978). {λ, x, y, z} = Import["http://www.cvrl.org/database/data/cmfs/ciexyzjv.csv"]\[Transpose]; ListLinePlot[{{λ, x}\[Transpose], {λ,y}\[Transpose], {λ, z}\[Transpose]}, PlotLegends -> {"X", "Y", "Z"}] Conversion of color ...


10

Extending ColorData For some background consider reading this bookmarked conversation. The color scheme data itself is accessed through the definition of this Symbol: DataPaclets`ColorDataDump`colorSchemes The data is located by use of the list defined in: DataPaclets`ColorDataDump`colorSchemeNames That is to say the scheme is extracted using ...


7

I thought I'd share my attempt at this, even though it doesn't seem to have worked properly. The CIE color matching functions are tabulated in the Image`ColorOperationsDump context which is used by ChromaticityPlot. The context can be loaded by calling ChromaticityPlot and then we can interpolate the data to obtain functions: ChromaticityPlot["RGB"]; {x, ...


6

Here are three progressively more intrusive steps to troubleshoot Mathematica. Hold down Shift-Control (Shift-Command on Mac) while starting Mathematica, as described here. If this didn't fix the problem, move to the next step. Evaluate SystemOpen[$UserBaseDirectory]. This will reveal the directory where Mathematica keeps all its settings, packages, ...


6

This example picks the colors according to atomic weight, which are loaded from ElementData[]. Like belisarius's answer, it generates a list of rules to replace colors which is then applied to the pane. Rule @@@ Transpose[{ColorData["Atoms", "ColorList"] , ColorData["NeonColors"][QuantityMagnitude@ElementData[#,"AtomicMass"]/200] & /@ ...


5

Like you, I found no colours in the output *.pov file. Mathematica recognises the pov extension, but Export["povtest.pov",pplot3D] outputs all triangle objects with white colour: pigment {color rgb <1, 1, 1>}. I took the brute-force approach and decomposed the 3D plot into vertices, triangles, and colours. Define the 3D plot. pplot3D = ...


5

Just for fun, try this ControllerManipulate[ RegionPlot[True, {x, 1, 4}, {y, 1, 4}, ColorFunctionScaling -> False, ColorFunction -> Function[{x, y}, Block[{d = Norm[l - #]}, RGBColor[1 - d/(1 + d), 0, d/(1 + d)]] & @{x, y}]], {{l, {2, 2}}, Locator, Appearance -> None}]


3

Let me shorten your example a little bit par = ParametricPlot3D[{1 + Cos[t], Sin[t], 2 Sin[t/2]}, {t, 0, 4 \[Pi]}, PlotStyle -> Red, Boxed -> False, AxesOrigin -> {0, 0, 0}, AspectRatio -> 1]; arr = Graphics3D[ { Arrowheads[0.02], {Red, Arrow[{a[0], a[0] + tf[0]}]}, {Green, Arrow[{a[1], a[1] + tf[1]}]}, {Blue, ...


3

Since as far as I can tell the Drawing Tools palette always uses the system (e.g. Windows) color picker I don't think it is (presently) possible to solve your first question. Your second question has more possibility: Is there a way to change the colours of objects made with Drawing Tools that will allow me to enter the C, M, Y, K values into input ...


2

It seems to me that there are two natural approaches: (1) modifying color rules before the panel is created or (2) post-processing the output to replace recognizable colors. belisarius already showed a method for the second so I shall address the first. Modifying the color rules The color rules are loaded through this call: ...


2

For ease of direct access I have found through digging the following relationships for indexed colors: map = {"Default" -> 97, "Earth" -> 98, "Garnet" -> 99, "Opal" -> 100, "Sapphire" -> 101, "Steel" -> 102, "Sunrise" -> 103, "Textbook" -> 104, "Water" -> 105, "BoldColor" -> 106, "CoolColor" -> 107, "DarkColor" -> ...



Only top voted, non community-wiki answers of a minimum length are eligible