<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="swatch" module="max" category="U/I">
	<digest>
		Choose a color
	</digest>
	<description>
		Provides 2-dimensional selection and display of colors, representing hue along the horizontal axis and lightness along the vertical axis. A third color dimension, saturation, may be set by means of the <m>saturation</m> message.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			U/I
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				RGB List(0. -1.)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Green (0. -1.)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				Blue (0. -1.)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				RGBA Color List Out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Saturation (0. -1.)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<palette category="Interface" action="swatch" pic="swatch.svg" />
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--parameter-->
	<parameter />
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output the current color values
			</digest>
			<description>
				<m>bang</m> message causes output of the RGBA values of the current color at the selected (x,y) position on the 2-dimensional colorspace, taking into account the current saturation value.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="red" optional="0" type="int" />
			</arglist>
			<digest>
				Set red color value
			</digest>
			<description>
				In left inlet: Set the red color value (ignores values over 1), and cause output of all values.
				<br />
				<br />
				Note: Unlike most Max objects, input to any one of the three inlets will re-calculate the current color location on the swatch, and trigger output.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="red" optional="0" type="float" />
			</arglist>
			<digest>
				Set red color value
			</digest>
			<description>
				Set the red color value (0.-1.), and cause output of all values.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="red" optional="0" type="number" />
				<arg name="green" optional="0" type="number" />
				<arg name="blue" optional="0" type="number" />
				<arg name="alpha" optional="0" type="number" />
			</arglist>
			<digest>
				Set color values, cause output
			</digest>
			<description>
				A list of three numbers between 0. and 1. sets the four RGBA color components (red, green, blue, alpha), refreshes the display and causes RGBA output.
			</description>
		</method>
		<method name="alpha">
			<arglist>
				<arg name="opacity" optional="0" type="float" />
			</arglist>
			<digest>
				Set alpha value
			</digest>
			<description>
				The word <m>alpha</m>, followed by a floating-point number between 0. and 1., will set the RGBA alpha (opacity) value.
			</description>
		</method>
		<method name="ft1">
			<arglist>
				<arg name="green" optional="0" type="float" />
			</arglist>
			<digest>
				Set green color value
			</digest>
			<description>
				Set the green color value (0.-1.), and cause output of all values.
			</description>
		</method>
		<method name="ft2">
			<arglist>
				<arg name="blue" optional="0" type="float" />
			</arglist>
			<digest>
				Set blue color value
			</digest>
			<description>
				Set the red color value (0.-1.), and cause output of all values.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="green" optional="0" type="int" />
			</arglist>
			<digest>
				Set green color value
			</digest>
			<description>
				In middle inlet: Set the red color value (ignores values over 1), and cause output of all values.
				<br />
				<br />
				Note: Unlike most Max objects, input to any one of the three inlets will re-calculate the current color location on the swatch, and trigger output.
			</description>
		</method>
		<method name="in2">
			<arglist>
				<arg name="blue" optional="0" type="int" />
			</arglist>
			<digest>
				Set blue color value
			</digest>
			<description>
				In right inlet: Set the red color value (ignores values over 1), and cause output of all values.
				<br />
				<br />
				Note: Unlike most Max objects, input to any one of the three inlets will re-calculate the current RGBA color location on the swatch, and trigger output.
			</description>
		</method>
		<method name="hsl">
			<arglist>
				<arg name="hue" optional="0" type="int" />
				<arg name="saturation" optional="0" type="int" />
				<arg name="lightness" optional="0" type="int" />
			</arglist>
			<digest>
				Set color with an HSL list
			</digest>
			<description>
				The word <m>hsl</m>, followed by a list of three numbers between 0. and 1., sets the color based on the given hue (x-axis), saturation, and lightness (y-axis) values. The <o>swatch</o> object converts these values to RGBA color values, refreshes the display, and causes output of the RGBA values.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Select and output a color
			</digest>
			<description>
				Clicking and dragging on the <o>swatch</o> object will calculate and output the RGBA color at the selected (x, y) position on the 2-dimensional (hue-lightness) colorspace, taking into account the current saturation value.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="red" optional="0" type="number" />
				<arg name="green" optional="0" type="number" />
				<arg name="blue" optional="0" type="number" />
				<arg name="alpha" optional="0" type="number" />
			</arglist>
			<digest>
				Set color values with no output
			</digest>
			<description>
				The word <m>set</m>, followed by a list of three numbers between 0. and 1. sets the four RGBA color components (red, green, blue, alpha) and refreshes the display without causing RGBA output.
			</description>
		</method>
		<method name="sethsl">
			<arglist>
				<arg name="hue" optional="0" type="int" />
				<arg name="saturation" optional="0" type="int" />
				<arg name="lightness" optional="0" type="int" />
			</arglist>
			<digest>
				Set HSL color with no output
			</digest>
			<description>
				The word <m>sethsl</m>, followed by a list of three numbers between 0. and 1., sets the color based on the given hue (x-axis), saturation, and lightness (y-axis) values and the refreshes the display. Unlike the <m>hsl</m> message the <m>sethsl</m> message does not output the corresponding RGBA values.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="compatibility" get="1" set="1" type="int" size="1">
			<digest>
				Compatibility
			</digest>
			<description>
				Toggles the number input and output of the <o>swatch</o> object to be in the range of 0.-1.0 floating-point values (0, default) or to old-style 0-255 integer values (1).
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Output Old Style 0-255 Values" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="parameter_enable" get="1" set="1" type="int" size="1">
			<digest>
				Enable parameter mode handling
			</digest>
			<description>
				Enables use of this object with <link type="vignette" module="core" name="live_parameters">Max for Live Parameters</link> and allows for <link type="vignette" module="core" name="parameter_enable">setting initial parameter values</link> in the Max environment.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Parameter" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Parameter Mode Enable" />
				<attribute name="order" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="saturation" get="1" set="1" type="float" size="1">
			<digest>
				Saturation
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="float" size="1" value="255." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Saturation" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="swatch.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="colorpicker" />
		<seealso name="panel" />
		<seealso name="javascriptchapter03" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="list">
			<description>
				Out left outlet: a list of four RGBA (red, green, blue, alpha) color values
			</description>
		</entry>
		<entry name="int">
			<description>
				Out right outlet: the current saturation value (calculated from an RGB list input, or output directly after a <m>saturation</m> message)
			</description>
		</entry>
	</misc>
</c74object>
