<?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[Optimale Schriftfarbe für Hintergrund berechnen]]></title><description><![CDATA[<p>Hallo, ich möchte je nach gerade eingestellte Hintergrundfarbe automatisch entweder die scharze oder weiße Schriftfarbe wählen. Hat jemand ein Beispiel wie man am geschicktesten aus dem TColor Wert die richtige Entscheidung treffen kann?</p>
<p>Bye - Peter</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/167069/optimale-schriftfarbe-für-hintergrund-berechnen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 03:53:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/167069.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 Dec 2006 10:07:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Optimale Schriftfarbe für Hintergrund berechnen on Wed, 06 Dec 2006 10:07:18 GMT]]></title><description><![CDATA[<p>Hallo, ich möchte je nach gerade eingestellte Hintergrundfarbe automatisch entweder die scharze oder weiße Schriftfarbe wählen. Hat jemand ein Beispiel wie man am geschicktesten aus dem TColor Wert die richtige Entscheidung treffen kann?</p>
<p>Bye - Peter</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1187767</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1187767</guid><dc:creator><![CDATA[Peter Tuschik]]></dc:creator><pubDate>Wed, 06 Dec 2006 10:07:18 GMT</pubDate></item><item><title><![CDATA[Reply to Optimale Schriftfarbe für Hintergrund berechnen on Wed, 06 Dec 2006 10:11:41 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Z.Bsp. so</p>
<pre><code class="language-cpp">TColor GetBlackOrWhite( const TColor&amp; Color)
{
     int rgbcol = ColorToRGB(Color);
     int rcol = (rgbcol &amp; 0xFF0000) &gt;&gt; 16;
     int gcol = (rgbcol &amp; 0x00FF00) &gt;&gt; 8;
     int bcol = rgbcol &amp; 0x0000FF;
     if( (rcol + bcol + gcol) &gt; 400) return clBlack;
     return clWhite;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1187771</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1187771</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 06 Dec 2006 10:11:41 GMT</pubDate></item><item><title><![CDATA[Reply to Optimale Schriftfarbe für Hintergrund berechnen on Wed, 06 Dec 2006 14:02:47 GMT]]></title><description><![CDATA[<p>Vielen Dank!<br />
Wenn man bei Grün-Werten &gt; 220 zusätzlich auf clBlack setzt, ist das Ergebnis noch besser.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1187950</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1187950</guid><dc:creator><![CDATA[Peter Tuschik]]></dc:creator><pubDate>Wed, 06 Dec 2006 14:02:47 GMT</pubDate></item><item><title><![CDATA[Reply to Optimale Schriftfarbe für Hintergrund berechnen on Thu, 07 Dec 2006 11:43:38 GMT]]></title><description><![CDATA[<p>Danke, ich werde das mit einbauen.</p>
<p>Ciao</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1188267</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1188267</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 07 Dec 2006 11:43:38 GMT</pubDate></item></channel></rss>