<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=MIST_hexToRGB</id>
		<title>MIST hexToRGB - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=MIST_hexToRGB"/>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_hexToRGB&amp;action=history"/>
		<updated>2026-04-25T14:11:49Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.hoggitworld.com/index.php?title=MIST_hexToRGB&amp;diff=13949&amp;oldid=prev</id>
		<title>Grimes: Created page with &quot;{{Mission Scripting  |fName= mist.utils.hexToRGB|  |vNum = Mist 4.5  |desc= Converts a hexadecimal string into a color table in the format of {red, green, blue, alpha} indexed...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_hexToRGB&amp;diff=13949&amp;oldid=prev"/>
				<updated>2022-02-12T00:01:14Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Mission Scripting  |fName= mist.utils.hexToRGB|  |vNum = Mist 4.5  |desc= Converts a hexadecimal string into a color table in the format of {red, green, blue, alpha} indexed...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Mission Scripting&lt;br /&gt;
&lt;br /&gt;
|fName= mist.utils.hexToRGB|&lt;br /&gt;
&lt;br /&gt;
|vNum = Mist 4.5&lt;br /&gt;
&lt;br /&gt;
|desc= Converts a hexadecimal string into a color table in the format of {red, green, blue, alpha} indexed numerically in a color table with values from 0 to 255. &lt;br /&gt;
The optional value if present returns the value in a range of 0 to 1 for each value as used with the color tables passed to [[DCS_func_markupToAll|markup functions.]] &lt;br /&gt;
&lt;br /&gt;
The mist function [[MIST_markerAdd|mist.marker.add]] automatically calls this if the value passed is a hexadecimal value. &lt;br /&gt;
&lt;br /&gt;
|rtnType= table&lt;br /&gt;
&lt;br /&gt;
|reqType1= string&lt;br /&gt;
&lt;br /&gt;
|reqName1= hex&lt;br /&gt;
&lt;br /&gt;
|reqType2=&lt;br /&gt;
&lt;br /&gt;
|optType1= boolean&lt;br /&gt;
|optName1= range&lt;br /&gt;
|optType2=&lt;br /&gt;
&lt;br /&gt;
|varExamples= &amp;quot;004040ff&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|rtnExamples= {0, 64, 64, 1}&lt;br /&gt;
&lt;br /&gt;
|example= The following references the color of a drawing named &amp;quot;samZone&amp;quot; and converts the value into an RGBA table. &lt;br /&gt;
&lt;br /&gt;
  local ref = mist.DBs.drawingsByName['samZone']&lt;br /&gt;
  local rgbaColor = mist.uitls.hexToRGB(ref.colorString, true)&lt;br /&gt;
&lt;br /&gt;
|notes= For whatever reason the mission file stores the color of drawings in hex while every other instance of color uses RGBA. The values stored here have an extra pair of characters (&amp;quot;0x&amp;quot;) which this function will trim automatically. For example: &amp;quot;0x004040ff&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|funcs= {{listOfMistUnitConversions}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
[[Category: MIST|hexToRGB]]&lt;/div&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	</feed>