cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

RGB color values changing in Graph Builder

EH1
EH1
Level III

I am trying to create a pie chart with specific colors using RGB values.  By "right-clicking" on the legend, I can select "Fill Color" --> "Other".  From there, I can select the specific RGB value.  I enter the following RGB values: R (225), B (79), G (113).  However, after I select "Ok" and look at the pie chart, I can tell it's not the correct color.  When I go back in to look at the color, the RGB values show:  R (214), B (54), G (94).  This RGB color shift is also happening to other custom colors I am trying to utilize.  I just updated to JMP 15.0.0 and did NOT have this issue on JMP 14.  Also, I am using a Mac.  Can anyone please help me with what I may be doing wrong?

4 REPLIES 4
pmroz
Super User


Re: RGB color values changing in Graph Builder

I tried a simple example with JMP 15 and Windows 10 and didn't have this problem.  Click the red triangle and select Save Script > To Script Window.  You'll see where JSL is setting the colors.  You can alter the code and use your colors.  Here's a simple example where I set one color to RGB of 225, 79, 113:

dt = New Table( "Pie Color", Add Rows( 14 ), 
	New Column( "Column 1", Character, "Nominal",
		Set Values( {"aaa", "aaa", "aaa", "bbb", "bbb", "bbb", "bbb", "ccc", "ccc", "ccc",
					 "ccc", "ccc", "ccc", "ccc"}
		)
	)
);

dt << Graph Builder(
	Size( 490, 435 ),
	Show Control Panel( 0 ),
	Variables( X( :Column 1 ) ),
	Elements( Pie( X, Legend( 5 ) ) ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model( 5,
				Properties( 0, {Fill Color( -14765937 )}, Item ID( "aaa", 1 ) )
			)}
		)
	)
);

The saved JSL shows a fill color of -14765937.  If you convert this to RGB you get (.8823, .3098, .4431), which is (225, 79, 113).  You can set the color with RGB values like this:

				Properties( 0, {Fill Color( {225, 79, 113} )}, Item ID( "aaa", 1 ) )
pmroz
Super User


Re: RGB color values changing in Graph Builder

To convert -14765937 to RGB values:

c = color to rgb(-14765937);
{0.882352941176471, 0.309803921568627, 0.443137254901961}
d = c * 255;
{225, 79, 113}

ExamplePie.png

Jeff_Perkinson
Community Manager Community Manager


Re: RGB color values changing in Graph Builder

This looks like it might be a bug. It would be best to pass it to Tech Support (support@jmp.com) to ensure it gets investigated and reported appropriately.

-Jeff


Re: RGB color values changing in Graph Builder

Thanks for reporting this issue. JMP Development has looked at it and made improvements. The fix will be available in JMP 16.1 and higher, which will be available in summer 2021.