# Produce the same color scheme as IboView

I can use the following command to produce the HOMO (highest occupied molecular orbital) in chemistry:

Clear["Global*"];
cm = 72/2.54;

datapath = "ExampleData/Pyridinecarbonitrile_MO_25_29.cub";
g1 = Import[
datapath,
"Graphics3D",
Contours -> {-0.02, 0.02},

ContourStyle -> {{Blue, Opacity[0.6]}, {Red, Opacity[0.6]}},
Background -> None,
(*MeshStyle->Gray,*)
(*Mesh->Automatic,*)
ImageSize -> {8 cm, 6 cm}
] // First


It looks pretty good, but compared to IboView, it's not as beautiful. Here are some images of the IboView:

This color scheme is really nice! So how do I get the same color scheme in Wolfram as IboView?

=========upgrate=========

by Specularity and Lighting function,change some

Clear["Global*"];
cm = 72/2.54;

datapath = "ExampleData/Pyridinecarbonitrile_MO_25_29.cub";
g1 = Import[
datapath,
"Graphics3D",
Contours -> {-0.02, 0.02},

ContourStyle -> {
{
RGBColor["#c593fc"],
Opacity[0.6],
Specularity[Lighter@RGBColor["#9053e2"], 50]
},
{
RGBColor["#8ab6f4"],
Opacity[0.6],
Specularity[Lighter@RGBColor["#5f9bf0"], 50]
}
},
Lighting -> "ThreePoint",
Method -> {"RelieveDPZFighting" -> True},
Background -> None
(*MeshStyle->Gray,
Mesh->Automatic*)
] // First


It's a little closer to the color scheme.Then I tried the Glow function

I can use ImageData function get image color data

i = Import[
"https://cdn.jsdelivr.net/gh/wxyhgk/paper-picture/202207231113165.\
png"]
Flatten[ImageData[ColorConvert[i, "RGB"]], 1]
BubbleChart[
Append @@@
Tally[Round[
Flatten[ImageData[ColorConvert[i, "LAB"]], 1][[All, {2, 3}]],
10^-1]], ColorFunction -> (LABColor[.6, ##] &),
ColorFunctionScaling -> False, BubbleSizes -> {0.01, 0.1}]


Perhaps this color data can be used for ContourStyle? What do I do next, I don't know

• Good question. Btw, as a matter of principle, I find it a bit problematic to have Import statements that run code from some other place because it could be dangerous, but maybe the mods allow it. Jul 22 at 13:30
• You've imported the data from the external source "https://github.com/wxyhgk/molecular/releases/download/cube/Ar-I_\ mo40.cub", that's the dangerous part. Also, even if the data is safe, there's no guarentee that the link won't be broken in the future. It's better to use ExampleData as in document page instead. Jul 22 at 13:47
• @xzczd I have change datapath Jul 22 at 13:56
• I don't share the paranoia here - I regularly put code on this site that contains Import["http. Uploading a file to github so it can be an example here is completely appropriate Jul 22 at 14:37
• @JasonB. The risk isn't high of course, but link breaking did happen in the past: mathematica.stackexchange.com/posts/167368/revisions Jul 22 at 14:45