<?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[Farben]]></title><description><![CDATA[<p>hi,</p>
<p>ich möchte in meinem programm zum einem bestimmten verhältnis zweier variablen jeweils eine bestimmte farbe dastellen.</p>
<p>Beispiel</p>
<p>x/xmax = 1 -&gt; rot<br />
x/xmax = -1 -&gt; blau<br />
x/xmax = 0.5 -&gt; gelb</p>
<p>die reihenfolge ist dabei weniger wichtig, es sollten nur kontinuierliche farbübergänge sein. mit RGB gets ja anscheinend nicht, oder ich hab da was falsch gemacht</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/147940/farben</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 03:51:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/147940.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 21 May 2006 20:48:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Farben on Sun, 21 May 2006 20:48:36 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>ich möchte in meinem programm zum einem bestimmten verhältnis zweier variablen jeweils eine bestimmte farbe dastellen.</p>
<p>Beispiel</p>
<p>x/xmax = 1 -&gt; rot<br />
x/xmax = -1 -&gt; blau<br />
x/xmax = 0.5 -&gt; gelb</p>
<p>die reihenfolge ist dabei weniger wichtig, es sollten nur kontinuierliche farbübergänge sein. mit RGB gets ja anscheinend nicht, oder ich hab da was falsch gemacht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1062396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1062396</guid><dc:creator><![CDATA[PeterLustig]]></dc:creator><pubDate>Sun, 21 May 2006 20:48:36 GMT</pubDate></item><item><title><![CDATA[Reply to Farben on Sun, 21 May 2006 20:49:14 GMT]]></title><description><![CDATA[<p>was geht da nicht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1062397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1062397</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Sun, 21 May 2006 20:49:14 GMT</pubDate></item><item><title><![CDATA[Reply to Farben on Sun, 21 May 2006 20:57:23 GMT]]></title><description><![CDATA[<p>sowas in der Art</p>
<pre><code class="language-cpp">SelectObject (hdc, CreateSolidBrush((COLORREF) ( x/xMax)));
</code></pre>
<p>ich suche irgendne einfache fkt die ein variablenverhältnis auf eine farbe abbildet. hast du da ne idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1062402</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1062402</guid><dc:creator><![CDATA[PeterLustig]]></dc:creator><pubDate>Sun, 21 May 2006 20:57:23 GMT</pubDate></item><item><title><![CDATA[Reply to Farben on Sun, 21 May 2006 21:14:07 GMT]]></title><description><![CDATA[<p>so direkt geht das wohl nicht<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/colors_9xiq.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/colors_9xiq.asp</a><br />
du musst dein ergebniss zwischen 1 und -1 wohl entsprechend umrechnen.<br />
die funktion dazu musst du wohl selbst schreiben.<br />
rot wär dann 0x000000FF = 255<br />
blau 0x00FF0000 = 16711680</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1062409</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1062409</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Sun, 21 May 2006 21:14:07 GMT</pubDate></item><item><title><![CDATA[Reply to Farben on Sun, 21 May 2006 21:35:47 GMT]]></title><description><![CDATA[<p>ja, so hab ich mir das ja auch gedacht und dann mal so umgesetzt</p>
<pre><code class="language-cpp">SelectObject (hdc, CreateSolidBrush((COLORREF) ( 255 + 8355840 + 16711680 *(x/xMax))));
</code></pre>
<p>mit kontinuierlichen farbübergängen ist da aber nicht viel, sieht eher aus wie ne tapete aus den siebzigern.<br />
ich möchte damit einem 3D-Graphen entsprechend den werten eine bestimmte farbe zuordnen, deswegen sollten es halt kontinuierliche übergänege sein.</p>
<p>gibts da nicht irgendne andere palette, von mir aus auch mit nur 256 Farben, mit der sowas leicht möglich ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1062418</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1062418</guid><dc:creator><![CDATA[PeterLustig]]></dc:creator><pubDate>Sun, 21 May 2006 21:35:47 GMT</pubDate></item><item><title><![CDATA[Reply to Farben on Mon, 22 May 2006 07:00:16 GMT]]></title><description><![CDATA[<p>da wär dann<br />
1 = 16<sup>2</sup> rot<br />
0 = 16<sup>4</sup> gelb<br />
-1 = 16<sup>6</sup> blau</p>
<p>und schon isses linear</p>
<p>die entsprechende gleichung kann ich jetzt aber nicht ausrechnen sry</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1062498</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1062498</guid><dc:creator><![CDATA[f(x)]]></dc:creator><pubDate>Mon, 22 May 2006 07:00:16 GMT</pubDate></item><item><title><![CDATA[Reply to Farben on Mon, 22 May 2006 07:02:59 GMT]]></title><description><![CDATA[<p>da wär dann<br />
1 = 16<sup>2</sup> rot<br />
0 = 16<sup>4</sup> gelb<br />
-1 = 16<sup>6</sup> blau</p>
<p>und schon isses linear</p>
<p>(COLORREF) 16<sup>-2*(x/xmax)+4</sup> (oder so?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1062499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1062499</guid><dc:creator><![CDATA[f(x)]]></dc:creator><pubDate>Mon, 22 May 2006 07:02:59 GMT</pubDate></item><item><title><![CDATA[Reply to Farben on Mon, 22 May 2006 11:30:40 GMT]]></title><description><![CDATA[<p>so gehts leider auch nicht. colorref will sich wohl einfach nicht linear verhalten. dann werd ich mir halt 24 farben per hand definieren und entsprechend einsetzen.</p>
<p>danke trotzdem</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1062695</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1062695</guid><dc:creator><![CDATA[PeterLustig]]></dc:creator><pubDate>Mon, 22 May 2006 11:30:40 GMT</pubDate></item></channel></rss>