<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://avisynth.nl/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=Hue</id>
		<title>Hue - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=Hue"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Hue&amp;action=history"/>
		<updated>2026-04-26T23:33:59Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.24</generator>

	<entry>
		<id>http://avisynth.nl/index.php?title=Hue&amp;diff=11965&amp;oldid=prev</id>
		<title>Reel.Deal: Hue: add documentation</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Hue&amp;diff=11965&amp;oldid=prev"/>
				<updated>2020-07-03T07:08:27Z</updated>
		
		<summary type="html">&lt;p&gt;Hue: add documentation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{FilterCat4|External_filters|Plugins|Adjustment_filters|Levels_and_Chroma_filters}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1={{author/Wilbert Dijkhof}}&lt;br /&gt;
|2=v1.0&lt;br /&gt;
|3=[http://www.wilbertdijkhof.com/Hue_v10.zip Hue_v10.zip]&lt;br /&gt;
|4=Color Adjustment filters&lt;br /&gt;
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=87439&amp;amp;pagenumber=2 Doom9 Forum]}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This plugin is a port of Donald Graft's VirtualDub [http://rationalqm.us/hue.html Hue] filter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.5.8 or greater]&lt;br /&gt;
* Supported color formats: [[RGB24]], [[RGB32]]&lt;br /&gt;
* Requires progressive video&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|Hue (clip, float &amp;quot;hue&amp;quot;, float &amp;quot;sat&amp;quot;, float &amp;quot;intensity&amp;quot;, string &amp;quot;channels&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip, must be RGB.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|hue|float|0.0}}&lt;br /&gt;
:::The hue is the color flavor  (restricted here to the ones listed in the &amp;lt;code&amp;gt;&amp;quot;channels&amp;quot;&amp;lt;/code&amp;gt; parameter).&lt;br /&gt;
&lt;br /&gt;
:::Example:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 67em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# should change pixels with red hue into yellows, but it doesn't&lt;br /&gt;
ColorBars(300,200).ConvertToRGB32()&lt;br /&gt;
Hue(hue=60, channels=&amp;quot;R&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# should rotate all six hue 60 degrees (thus red into yellow, yellow into green, green into cyan,&lt;br /&gt;
# cyan into blue, blue into magenta and magenta into red), but it doesn't&lt;br /&gt;
ColorBars(300,200).ConvertToRGB32()&lt;br /&gt;
Hue(hue=60, channels=&amp;quot;RYGCBM&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:::A pixel is called red if the hue of a pizel is red. It is defined here as follows:&lt;br /&gt;
:::*'''Assuming blue is the minimum''': around the color wheel we get red, yellow, green. red + green makes yellow. So it is broken up as 1/3, 1/3, 1/3. '''If g &amp;lt; 2/3 r then the hue of the pixel is red.''' If r &amp;lt; 2/3 g then the pixel is green. Else it is both, so it is yellow.&lt;br /&gt;
:::*'''Assuming green is the minimum''': around the color wheel we get red, magenta, blue. red + blue makes magenta. So it is broken up as 1/3, 1/3, 1/3. '''If b &amp;lt; 2/3 r then the hue of the pixel is red.''' If r &amp;lt; 2/3 b then the pixel is blue. Else it is both, so it is magenta.&lt;br /&gt;
:::The same holds for the hue of the other colors.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|sat|float|1.0}}&lt;br /&gt;
:::The saturation (sat) is the dominance of the hue in the color. It should be noted that this is NOT the same as the saturation in the HSV color format. Setting the saturation to zero converts the clip to (R,G,B) = (Y,Y,Y) where Y is the luminance (ie Y = 0.3086*R + 0.6094*G + 0.0820*B) of the clip [*]. Setting it to one leaves the clip untouched. For values inside [0,1] it just performs linear interpolation, and for values outside [0,1] it performs linear extrapolation.&lt;br /&gt;
&lt;br /&gt;
:::Example:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 67em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# decreases the red pixels of the clip to match the luminance&lt;br /&gt;
ColorBars(300,200).ConvertToRGB32()&lt;br /&gt;
Hue(sat=0, channels=&amp;quot;R&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# doesn't do anything&lt;br /&gt;
ColorBars(300,200).ConvertToRGB32()&lt;br /&gt;
Hue(sat=1, channels=&amp;quot;R&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# increases the red pixels of the clip to 255&lt;br /&gt;
ColorBars(300,200).ConvertToRGB32()&lt;br /&gt;
Hue(sat=1.5, channels=&amp;quot;R&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|intensity|float|1.0}}&lt;br /&gt;
:::The intensity indicates how light or dark a color is. Setting it to zero will decrease the red pixels (if you asked for the red color flavor) to black, and setting it to one will leave the clip untouched. Setting it higher than one will increase the red pixels to white.&lt;br /&gt;
&lt;br /&gt;
:::'''[*]''' Usually the luminance is defined as Y = 0.299*R + 0.587*G + 0.114*B (using Rec.601 coefficients), but according [https://web.archive.org/web/20040825061928/http://www.sgi.com/misc/grafica/matrix/index.html Haeberli] the used transformation is better for linear RGB colors.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|channels|string|&amp;quot;RYGCBM&amp;quot;}}&lt;br /&gt;
:::The selectable color flavors: red (R), yellow (Y), green (G), cyan (C), blue (B), magenta (M) and combinations (GCM, etc.).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
Hue with default settings:&lt;br /&gt;
 AviSource(&amp;quot;blah.avi&amp;quot;)&lt;br /&gt;
 Hue(hue=0.0, sat=1.0, intensity=1.0, channels=&amp;quot;RYGCBM&amp;quot;)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date            Changes&amp;lt;br&amp;gt;&lt;br /&gt;
 v1.0         2005/01/02      - initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v1.0&lt;br /&gt;
|[http://www.wilbertdijkhof.com/Hue_v10.zip Hue_v10.zip]&lt;br /&gt;
|[https://web.archive.org/web/20180828081235if_/http://www.wilbertdijkhof.com/Hue_v10.zip Hue_v10.zip]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External Links ==&lt;br /&gt;
*[https://web.archive.org/web/20040825061928/http://www.sgi.com/misc/grafica/matrix/index.html Matrix Operations for Image Processing (by Haeberli)]: I guess this is the references where the used transformations are coming from. Graft link: Original VirtualDub version of this plugin.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Levels_and_Chroma|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Reel.Deal</name></author>	</entry>

	</feed>