<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic using RGB values in JSL scripts instead of color name or whatever this (--16741343) is in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/using-RGB-values-in-JSL-scripts-instead-of-color-name-or/m-p/426578#M67640</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm new to using a basic JSL script that was saved after building a bar chart graphic. Although I set RGB values to assign colors to bars in Graph Builder, the resulting JSL script gives me this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Properties( 1, {Fill Color( "yellow" )} ),
Properties( 2, {Fill Color( -16741343 )} ),
Properties( 3, {Fill Color( -11075814 )} ),
Properties( 4, {Fill Color( -16755200 )} ),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I use RGB values in this script instead and if so, what's the syntax? I tried "yellow" for example which works fine, but {Fill Color( 255,255,0 )} - the yellow I really want - does not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to use your own colors, or do you have to use JMPs table of colors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2023 11:18:22 GMT</pubDate>
    <dc:creator>ReneeBay</dc:creator>
    <dc:date>2023-06-11T11:18:22Z</dc:date>
    <item>
      <title>using RGB values in JSL scripts instead of color name or whatever this (--16741343) is</title>
      <link>https://community.jmp.com/t5/Discussions/using-RGB-values-in-JSL-scripts-instead-of-color-name-or/m-p/426578#M67640</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm new to using a basic JSL script that was saved after building a bar chart graphic. Although I set RGB values to assign colors to bars in Graph Builder, the resulting JSL script gives me this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Properties( 1, {Fill Color( "yellow" )} ),
Properties( 2, {Fill Color( -16741343 )} ),
Properties( 3, {Fill Color( -11075814 )} ),
Properties( 4, {Fill Color( -16755200 )} ),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I use RGB values in this script instead and if so, what's the syntax? I tried "yellow" for example which works fine, but {Fill Color( 255,255,0 )} - the yellow I really want - does not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to use your own colors, or do you have to use JMPs table of colors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:18:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/using-RGB-values-in-JSL-scripts-instead-of-color-name-or/m-p/426578#M67640</guid>
      <dc:creator>ReneeBay</dc:creator>
      <dc:date>2023-06-11T11:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: using RGB values in JSL scripts instead of color name or whatever this (--16741343) is</title>
      <link>https://community.jmp.com/t5/Discussions/using-RGB-values-in-JSL-scripts-instead-of-color-name-or/m-p/426583#M67642</link>
      <description>&lt;P&gt;You need to use the RGB Color() function. The Scripting Index gives a nice example of using the RGB Color() function to convert from RGB to the JMP color,.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
New Window( "RGB Color Example", 
/* 1 through 16 are good */ 
	division = 6;
	blocks = division + 1;
	ysize = 400 / Sqrt( division );
	xsize = ysize * blocks;
	fract = 1 / division;
/* 100 is default axis range */
	yBlockSize = 100 / blocks;
	xBlockSize = 100 / (blocks * blocks);
	Graph(
		frameSize( xsize, ysize ),
		For( blue = 0, blue &amp;lt;= 1, blue += fract,
			For( red = 0, red &amp;lt;= 1, red += fract,
				For( green = 0, green &amp;lt;= 1,
					green += fract,
					y = red / fract * yBlockSize;
					x = green / fract * xBlockSize
					+blue / fract * xBlockSize * blocks;
/* here's the example */
					Fill Color(
						RGB Color( red, green, blue )
					);
					Rect(
						x,
						y,
						x + xBlockSize,
						y + yBlockSize,
						1
					);
				)
			)
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 18:12:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/using-RGB-values-in-JSL-scripts-instead-of-color-name-or/m-p/426583#M67642</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-10-14T18:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: using RGB values in JSL scripts instead of color name or whatever this (--16741343) is</title>
      <link>https://community.jmp.com/t5/Discussions/using-RGB-values-in-JSL-scripts-instead-of-color-name-or/m-p/426596#M67643</link>
      <description>&lt;P&gt;Thanks so much! Worked perfectly!!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 18:21:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/using-RGB-values-in-JSL-scripts-instead-of-color-name-or/m-p/426596#M67643</guid>
      <dc:creator>ReneeBay</dc:creator>
      <dc:date>2021-10-14T18:21:29Z</dc:date>
    </item>
  </channel>
</rss>

