<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/index.php?action=history&amp;feed=atom&amp;title=URGB2HSL</id>
	<title>URGB2HSL - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/index.php?action=history&amp;feed=atom&amp;title=URGB2HSL"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=URGB2HSL&amp;action=history"/>
	<updated>2026-04-22T09:15:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=URGB2HSL&amp;diff=1194558&amp;oldid=prev</id>
		<title>ObviousAltIsObvious Resident: &lt;lsl&gt; tag to &lt;source&gt;</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=URGB2HSL&amp;diff=1194558&amp;oldid=prev"/>
		<updated>2015-01-22T22:34:35Z</updated>

		<summary type="html">&lt;p&gt;&amp;lt;lsl&amp;gt; tag to &amp;lt;source&amp;gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:34, 22 January 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* LSO: 502 bytes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* LSO: 502 bytes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* MONO: 1536 bytes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* MONO: 1536 bytes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lsl&lt;/del&gt;&amp;gt;vector uRGB2HSL( vector vColRGB ){&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source lang=&quot;lsl2&quot;&lt;/ins&gt;&amp;gt;vector uRGB2HSL( vector vColRGB ){&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	vector vColHSL = vColRGB;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	vector vColHSL = vColRGB;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if (vColHSL.x &amp;lt; vColHSL.y){&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if (vColHSL.x &amp;lt; vColHSL.y){&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/*//   2011 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0 ]   //*/&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/*//   2011 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0 ]   //*/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/*//  Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ]  //*/&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/*//  Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ]  //*/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/*//--                                                                 --//*/&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lsl&lt;/del&gt;&amp;gt;&amp;lt;!-- Please do not remove license statement --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/*//--                                                                 --//*/&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source&lt;/ins&gt;&amp;gt;&amp;lt;!-- Please do not remove license statement --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ObviousAltIsObvious Resident</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=URGB2HSL&amp;diff=1159792&amp;oldid=prev</id>
		<title>Void Singer: ~correction of stupid mistake</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=URGB2HSL&amp;diff=1159792&amp;oldid=prev"/>
		<updated>2011-12-17T03:28:56Z</updated>

		<summary type="html">&lt;p&gt;~correction of stupid mistake&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:28, 16 December 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot;&gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|content=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|content=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To convert RGB or HSL values from other software to percentage based, simply divide each value by it&amp;#039;s range&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To convert RGB or HSL values from other software to percentage based, simply divide each value by it&amp;#039;s range&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;for RGB the &lt;/del&gt;range is &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;usually [0, 255] which is 256 (0 counts as a possible value)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** range is &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;determined by subtracting &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lower bound from &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;upper bound.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** for HSL &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;range of H is usually [0,360) (360 = 0) so &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;total range is 360 (since 360 overlaps)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To convert RGB or HSL percentages to your preferred format, multiply the value by the preferred range.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To convert RGB or HSL percentages to your preferred format, multiply the value by the preferred range.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Void Singer</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=URGB2HSL&amp;diff=1159791&amp;oldid=prev</id>
		<title>Void Singer: new</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=URGB2HSL&amp;diff=1159791&amp;oldid=prev"/>
		<updated>2011-12-17T03:15:30Z</updated>

		<summary type="html">&lt;p&gt;new&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LSL Header|[[:Category:LSL_User-Defined_Functions|User-Defined Functions]]|[[User:Void_Singer|Void&amp;#039;s User Page]]}} &amp;lt;!-- please do not remove added links --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
{{DISPLAYTITLE:uRGB2HSL}}&lt;br /&gt;
{{void-box&lt;br /&gt;
|title=&amp;lt;div id=&amp;quot;box&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;&amp;lt;h2&amp;gt;Summary&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;[[:Category:LSL_User-Defined_Functions|User-Defined Function]]: [[vector]] uRGB2HSL( [[vector]] &amp;#039;&amp;#039;vColRGB&amp;#039;&amp;#039; );&lt;br /&gt;
|content=&lt;br /&gt;
Returns a percentage based vector that is &amp;#039;&amp;#039;vColRGB&amp;#039;&amp;#039; converted to a HSL.&lt;br /&gt;
* &amp;#039;&amp;#039;vColRGB&amp;#039;&amp;#039;: source color as percentages of range.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Code:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* LSO: 502 bytes&lt;br /&gt;
* MONO: 1536 bytes&lt;br /&gt;
&amp;lt;lsl&amp;gt;vector uRGB2HSL( vector vColRGB ){&lt;br /&gt;
	vector vColHSL = vColRGB;&lt;br /&gt;
	if (vColHSL.x &amp;lt; vColHSL.y){&lt;br /&gt;
		vColHSL = &amp;lt;vColHSL.y, vColHSL.x, vColHSL.z&amp;gt;;&lt;br /&gt;
	}&lt;br /&gt;
	if (vColHSL.x &amp;lt; vColHSL.z){&lt;br /&gt;
		vColHSL = &amp;lt;vColHSL.z, vColHSL.y, vColHSL.x&amp;gt;;&lt;br /&gt;
	}else if (vColHSL.y &amp;gt; vColHSL.z){&lt;br /&gt;
		vColHSL = &amp;lt;vColHSL.x, vColHSL.z, vColHSL.y&amp;gt;;&lt;br /&gt;
	}&lt;br /&gt;
	vColHSL.z = (vColHSL.x + vColHSL.y) * 0.5; //-- L&lt;br /&gt;
	vColHSL.y = vColHSL.x - vColHSL.y;         //-- C&lt;br /&gt;
	if (vColHSL.y){&lt;br /&gt;
		vColHSL.x = llList2Float( [(vColRGB.y - vColRGB.z) / vColHSL.y + 6.0 * (vColRGB.z &amp;gt; vColRGB.y),&lt;br /&gt;
		                           (vColRGB.z - vColRGB.x) / vColHSL.y + 2.0,&lt;br /&gt;
		                           (vColRGB.x - vColRGB.y) / vColHSL.y + 4.0],&lt;br /&gt;
		                          llListFindList( [vColRGB.x, vColRGB.y, vColRGB.z], (list)vColHSL.x  ) ) / 6.0; //-- H&lt;br /&gt;
		vColHSL.y = vColHSL.y / llList2Float( [2.0 * vColHSL.z, 2.0 - 2.0 * vColHSL.z], vColHSL.z &amp;gt; 0.5 );       //-- S&lt;br /&gt;
	}else{&lt;br /&gt;
		vColHSL.x = vColHSL.y; //-- Greyscale&lt;br /&gt;
	}&lt;br /&gt;
	return vColHSL;&lt;br /&gt;
}&lt;br /&gt;
/*//--                       Anti-License Text                         --//*/&lt;br /&gt;
/*//     Contributed Freely to the Public Domain without limitation.     //*/&lt;br /&gt;
/*//   2011 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0 ]   //*/&lt;br /&gt;
/*//  Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ]  //*/&lt;br /&gt;
/*//--                                                                 --//*/&amp;lt;/lsl&amp;gt;&amp;lt;!-- Please do not remove license statement --&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{void-box&lt;br /&gt;
|title=Caveats&lt;br /&gt;
|content=&lt;br /&gt;
* This function does not check input RGB validity. See [[uRGB2HSL#Articles|Articles]] below&lt;br /&gt;
* HSL is kept percentage based here for best compatibility with image mapping&lt;br /&gt;
* HSL color vectors may not be set directly&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{void-box&lt;br /&gt;
|title=Notes&lt;br /&gt;
|content=&lt;br /&gt;
* To convert RGB or HSL values from other software to percentage based, simply divide each value by it&amp;#039;s range&lt;br /&gt;
** for RGB the range is usually [0, 255] which is 256 (0 counts as a possible value)&lt;br /&gt;
** for HSL the range of H is usually [0,360) (360 = 0) so the total range is 360 (since 360 overlaps)&lt;br /&gt;
* To convert RGB or HSL percentages to your preferred format, multiply the value by the preferred range.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{void-box&lt;br /&gt;
|title=See Also&lt;br /&gt;
|content=&lt;br /&gt;
=== Functions ===&lt;br /&gt;
* [[uHSL2RGB]]&lt;br /&gt;
* [[llGetColor]]&lt;br /&gt;
* [[llGetPrimitiveParams]]&lt;br /&gt;
* [[llGetLinkPrimitiveParams]]&lt;br /&gt;
=== Articles ===&lt;br /&gt;
* [[:Category:LSL_Color|Color in LSL]]&lt;br /&gt;
}}&lt;br /&gt;
[[Category:LSL_User-Defined_Functions|RGB2HSL|uRGB2HSL]]&lt;br /&gt;
[[Category:LSL_Color|RGB2HSL|uRGB2HSL]]&lt;/div&gt;</summary>
		<author><name>Void Singer</name></author>
	</entry>
</feed>