Files
processing4/web/reference/API/saturation.xml
2005-01-27 06:48:42 +00:00

59 lines
892 B
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>saturation()</name>
<category>Color</category>
<subcategory>Creating &amp; Reading</subcategory>
<usage>Web &amp; Application</usage>
<example>
<image>saturation_.gif</image>
<code>
noStroke();
colorMode(HSB, 255);
color c = color(0, 126, 255);
fill(c);
rect(15, 20, 35, 60);
float value = saturation(c); // Sets "value" to "126"
fill(value);
rect(50, 20, 35, 60);
</code>
</example>
<description>
Extracts the saturation value from a color.
</description>
<syntax>
saturation(<c>color</c>)
</syntax>
<parameter>
<label>color</label>
<description>any value of the color datatype</description>
</parameter>
<returns>float</returns>
<related>
red()
green()
blue()
hue()
brightness()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
<level>Extended</level>
</root>