Skip to content

Commit da81e97

Browse files
committed
Correction for color datatype in Reference
1 parent 8c8b086 commit da81e97

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

content/api_en/include/color_datatype.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ rect(50, 0, 50, 100);
2323
</example>
2424

2525
<description><![CDATA[
26-
Datatype for storing color values. Colors may be assigned with <b>get()</b> and <b>color()</b> or they may be specified directly using hexadecimal notation such as <b>#FFCC00</b> or <b>0xFFFFCCOO</b>.
26+
Datatype for storing color values. Colors may be assigned with <b>get()</b> and <b>color()</b> or they may be specified directly using hexadecimal notation such as <b>#FFCC00</b> or <b>0xFFFFCC00</b>.
2727
<br /> <br />
2828
Using <b>print()</b> or <b>println()</b> on a color will produce strange results (usually negative numbers) because of the way colors are stored in memory. A better technique is to use the <b>hex()</b> function to format the color data, or use the <b>red()</b>, <b>green()</b>, and <b>blue()</b> functions to get individual values and print those. The <b>hue()</b>, <b>saturation()</b>, and <b>brightness()</b> functions work in a similar fashion. To extract red, green, and blue values more quickly (for instance when analyzing an image or a frame of video), use <a href="rightshift.html">bit shifting</a>.
2929
<br /> <br />

0 commit comments

Comments
 (0)