<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Paper : Usage of canvas.setTextColor() to define different grey scales.]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have a basic question arising from lack of examples.</p>
<p dir="auto">I am referring to<br />
<a href="https://docs.m5stack.com/en/api/m5paper/epd_canvas" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/api/m5paper/epd_canvas</a><br />
in order to set different grey scales for text on a canvas.</p>
<p dir="auto">I tried values from 0 to 15, 0x00, 0x0F, 0xFF and so on and found only 3 grey shades working.<br />
Can someone please specify which are the different values to be passed in as the first argument to canvas.setTextColor() in order to achieve the 16 different grey scale variants?</p>
<p dir="auto">Thanks,<br />
Zitrone</p>
]]></description><link>https://community.m5stack.com/topic/4362/m5paper-usage-of-canvas-settextcolor-to-define-different-grey-scales</link><generator>RSS for Node</generator><lastBuildDate>Thu, 07 May 2026 00:22:08 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4362.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Jun 2022 18:51:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Paper : Usage of canvas.setTextColor() to define different grey scales. on Mon, 13 Jun 2022 20:34:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> Thank you for the explanation and the link :)</p>
]]></description><link>https://community.m5stack.com/post/17723</link><guid isPermaLink="true">https://community.m5stack.com/post/17723</guid><dc:creator><![CDATA[zitrone]]></dc:creator><pubDate>Mon, 13 Jun 2022 20:34:12 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper : Usage of canvas.setTextColor() to define different grey scales. on Mon, 13 Jun 2022 20:08:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/zitrone" aria-label="Profile: zitrone">@<bdi>zitrone</bdi></a></p>
<p dir="auto">the number of gray scales depends on the refresh mode used. For instance <code>UPDATE_MODE_DU4</code> has 4 whereas <code>UPDATE_MODE_GC16</code> has 16. Check out the description at the beginning of this <a href="https://github.com/m5stack/M5EPD/blob/main/src/M5EPD_Driver.h" target="_blank" rel="noopener noreferrer nofollow ugc">file</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17721</link><guid isPermaLink="true">https://community.m5stack.com/post/17721</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 13 Jun 2022 20:08:36 GMT</pubDate></item></channel></rss>