<?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[How to change color of letters of highlighted text?]]></title><description><![CDATA[<p dir="auto">Hello!</p>
<p dir="auto">I want to change color of letters of highlighted text.</p>
<p dir="auto">Now letters are black:<br />
<img src="/assets/uploads/files/1602750780161-eea6623d-74b7-4748-a204-090bbdcf571c-image.png" alt="eea6623d-74b7-4748-a204-090bbdcf571c-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I want letters are white (screenshot from Notepad app):<br />
<img src="/assets/uploads/files/1602750824515-af9559c6-f6e6-4d60-bc51-725b903f2cf1-image.png" alt="af9559c6-f6e6-4d60-bc51-725b903f2cf1-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I use N++ 7.9 (64 bit, portable). Windws 7 Maximum.</p>
<p dir="auto">Please help!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20156/how-to-change-color-of-letters-of-highlighted-text</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 05:55:35 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20156.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Oct 2020 08:34:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Tue, 11 Jul 2023 18:14:51 GMT]]></title><description><![CDATA[<p dir="auto">Settings&gt;Style Configurator&gt;Selected Text color</p>
]]></description><link>https://community.notepad-plus-plus.org/post/87815</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/87815</guid><dc:creator><![CDATA[fdsafds fdsafdsa]]></dc:creator><pubDate>Tue, 11 Jul 2023 18:14:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Tue, 27 Oct 2020 15:27:05 GMT]]></title><description><![CDATA[<p dir="auto">A bit <em>less</em> than desirable, I noticed, is that if you do what I did and set the background of selected text to a dark blue, then a selection made in the <em>Find result</em> window is also backgrounded with dark blue.<br />
But since its foreground color isn’t changed, “yuck” results:</p>
<p dir="auto"><img src="/assets/uploads/files/1603812406391-17877bd2-2b8c-4c77-8d41-641bec7837f2-image.png" alt="17877bd2-2b8c-4c77-8d41-641bec7837f2-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/59143</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59143</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 27 Oct 2020 15:27:05 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Tue, 27 Oct 2020 13:57:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michael-vincent" aria-label="Profile: Michael-Vincent">@<bdi>Michael-Vincent</bdi></a></p>
<p dir="auto">DOH!  Good call.  For some reason I thought these things “went together” – if you override one, you have to also do the other one.  But…obviously not true.</p>
<p dir="auto">And, it isn’t even a workaround!<br />
Thanks!<br />
Marking it as “solved” (just in my mind).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/59139</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59139</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 27 Oct 2020 13:57:59 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Tue, 27 Oct 2020 13:43:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a></p>
<p dir="auto">Could it be after you open a new tab?  In the Notepad++ codebase <code>grep</code>-ing for <a href="https://www.scintilla.org/ScintillaDoc.html#SCI_SETSELFORE" rel="nofollow ugc">SCI_SETSELFORE/BACK</a> returns this:</p>
<p dir="auto">notepad-plus-plus\PowerEditor\src\ScitillaComponent\ScintillaEditView.cpp:</p>
<pre><code>2584:  void ScintillaEditView::performGlobalStyles()
2585:  {
2586:  	StyleArray &amp; stylers = NppParameters::getInstance().getMiscStylerArray();
2587:  
2588:  	int i = stylers.getStylerIndexByName(TEXT("Current line background colour"));
2589:  	if (i != -1)
2590:  	{
2591:  		Style &amp; style = stylers.getStyler(i);
2592:  		execute(SCI_SETCARETLINEBACK, style._bgColor);
2593:  	}
2594:  
2595:      COLORREF selectColorBack = grey;
2596:  
2597:  	i = stylers.getStylerIndexByName(TEXT("Selected text colour"));
2598:  	if (i != -1)
2599:      {
2600:          Style &amp; style = stylers.getStyler(i);
2601:  		selectColorBack = style._bgColor;
2602:      }
2603:  	execute(SCI_SETSELBACK, 1, selectColorBack);

</code></pre>
<p dir="auto">Seems like when that is called, it will set the selection background color which I’m assuming is read from <code>stylers.xml</code> (or whichever theme you’re running).  Maybe just change the theme “Selected text colour” instead of using PythonScript to do it?</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/59138</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59138</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Tue, 27 Oct 2020 13:43:26 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Tue, 27 Oct 2020 13:25:58 GMT]]></title><description><![CDATA[<p dir="auto">I as well would like to see the foreground of selected text changed.<br />
Background as well (but that one is easy as there is direct access).<br />
A nice white text on dark blue background sounds good. :-)</p>
<p dir="auto">So I change my <a href="http://startup.py" rel="nofollow ugc">startup.py</a> to have:</p>
<pre><code class="language-z">for e in (editor1, editor2):
    e.setSelFore(1, (255, 255, 255))
    e.setSelBack(1, (0, 0, 205))
</code></pre>
<p dir="auto">This works, and looks good IMO:</p>
<p dir="auto"><img src="/assets/uploads/files/1603804873769-d18b07d4-1bf7-4d2f-bcb2-99af151d3093-image.png" alt="d18b07d4-1bf7-4d2f-bcb2-99af151d3093-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">BUT…At some point later, it changes on its own to white on grey, which isn’t nearly as desirable:</p>
<p dir="auto"><img src="/assets/uploads/files/1603804772163-71540199-06ba-4e3b-b878-982a566a5450-image.png" alt="71540199-06ba-4e3b-b878-982a566a5450-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I did a N++ <em>Find in Files</em> search across all of my Pythonscripts, looking for <code>setSelFore</code> and <code>setSelBack</code> with no hits, so it doesn’t seem like it would be something I’m unintentionally altering after the change.</p>
<p dir="auto">Any ideas?<br />
Workarounds gleefully accepted; if you’ve got 'em, bring 'em.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/59137</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/59137</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 27 Oct 2020 13:25:58 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Tue, 20 Oct 2020 12:40:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said in <a href="/post/58635">How to change color of letters of highlighted text?</a>:</p>
<blockquote>
<p dir="auto">editor.setSelFore(1,(Red,Green,Blue))</p>
</blockquote>
<p dir="auto">It woooooooooooooooooooooorks!</p>
<p dir="auto">Thanks a lot!!!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/58853</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/58853</guid><dc:creator><![CDATA[Evgeny Morozov]]></dc:creator><pubDate>Tue, 20 Oct 2020 12:40:37 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Thu, 15 Oct 2020 15:53:16 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/evgeny-morozov" aria-label="Profile: evgeny-morozov">@<bdi>evgeny-morozov</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">As said before, there is <strong>NO</strong> setting to change the color of the <strong>selected</strong> text :-(</p>
<p dir="auto">However, if you have the <strong><code>NppExec</code></strong> or <strong><code>Python</code></strong> or <strong><code>Lua</code></strong> plugin installed, refer to this post :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/18727">https://community.notepad-plus-plus.org/post/18727</a></p>
<hr />
<p dir="auto">In a nutshell :</p>
<pre><code class="language-z">- With the PYTHON plugin, use :

  - To COLOR the FOREGROUND selection :

      editor.setSelFore(1,(Red,Green,Blue)),        with Red, Green, Blue  between   0 and 255
      editor.setSelFore(1,(0xRed,0xGreen,0xBlue)),  with Red, Green, Blue  between  00 and  FF

      editor.setSelFore(1,(0,0,0))  ( Default : Black )

  - To COLOR the BACKGROUND selection :

      editor.setSelBack(1,(Red,Green,Blue)),        with Red, Green, Blue  between   0 and 255
      editor.setSelBack(1,(0xRed,0xGreen,0xBlue)),  with Red, Green, Blue  between  00 and  FF

      editor.setSelBack(1,(192,192,192))  ( Default : Grey 192 )


- With the NPPEXEC plugin, use :

  - To COLOR the FOREGROUND selection :

      SCI_SENDMSG 2067 1 Dec_Value  or  SCI_SENDMSG SCI_SETSELFORE 1 Dec_Value,  with Dec_Value   between   0 and 16777215
      SCI_SENDMSG 2067 0xRRGGRR     or  SCI_SENDMSG SCI_SETSELFORE 1 0xRRGGRR,   with RR, GG, BB  between  00 and       FF

      SCI_SENDMSG 2067 1 0          or  SCI_SENDMSG SCI_SETSELFORE 1 0  ( Default : Black )

  - To COLOR the BACKGROUND selection :

      SCI_SENDMSG 2068 1 Dec_Value  or  SCI_SENDMSG SCI_SETSELBACK 1 Dec_Value,  with Dec_Value   between   0 and 16777215
      SCI_SENDMSG 2068 0xRRGGRR,    or  SCI_SENDMSG SCI_SETSELBACK 1 0xRRGGRR,   with RR, GG, BB  between  00 and       FF

      SCI_SENDMSG 2068 1 0xC0C0C0   or  SCI_SENDMSG SCI_SETSELBACK 1 0xC0C0C0  ( Default : Grey 192 )

NOTE :  Dec_Value = Blue x 65536 + Green x 256 + Red, with Blue, Green, Red  between 0 and 255

- With the LUA plugin, use :

  - To COLOR the BACKGROUND selection :

      editor:SetSelFore(1,Dec_Value),  with Dec_Value   between   0 and 16777215
      editor:SetSelFore(1,0xRRGGBB),   with RR, GG, BB  between  00 and       FF

      editor:SetSelFore(1,0)  ( Default : Black )

  - To COLOR the BACKGROUND selection :

      editor:SetSelBack(1,Dec_Value),  with Dec_Value   between   0 and 16777215
      editor:SetSelBack(1,0xRRGGBB),   with RR, GG, BB  between  00 and       FF

      editor:SetSelBack(1,0xC0C0C0)  ( Default : Grey 192 )

NOTE :  Dec_Value = Blue x 65536 + Green x 256 + Red, with Blue, Green, Red  between 0 and 255
</code></pre>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/58635</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/58635</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 15 Oct 2020 15:53:16 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Thu, 15 Oct 2020 12:58:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/evgeny-morozov" aria-label="Profile: Evgeny-Morozov">@<bdi>Evgeny-Morozov</bdi></a> said in <a href="/post/58614">How to change color of letters of highlighted text?</a>:</p>
<blockquote>
<p dir="auto">Trere is no way to change color of letters of highlighted text?</p>
</blockquote>
<p dir="auto">Yes, if the question is about an existing configuration setting, no otherwise.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/58625</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/58625</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Thu, 15 Oct 2020 12:58:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Thu, 15 Oct 2020 11:55:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nick-brown" aria-label="Profile: Nick-Brown">@<bdi>Nick-Brown</bdi></a> said in <a href="/post/58611">How to change color of letters of highlighted text?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/evgeny-morozov" aria-label="Profile: Evgeny-Morozov">@<bdi>Evgeny-Morozov</bdi></a></p>
<p dir="auto">You cannot set the foreground colour of the selection, only the background colour, this is so that any text that has been styled by one of the language lexers is not overridden.<br />
<img src="/assets/uploads/files/1602754161074-4ca166e9-43ca-4754-9436-94fc25be059f-image.png" alt="4ca166e9-43ca-4754-9436-94fc25be059f-image.png" class=" img-fluid img-markdown" /></p>
</blockquote>
<p dir="auto">Trere is no way to change color of letters of highlighted text?<br />
Have I understood you right?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/58614</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/58614</guid><dc:creator><![CDATA[Evgeny Morozov]]></dc:creator><pubDate>Thu, 15 Oct 2020 11:55:18 GMT</pubDate></item><item><title><![CDATA[Reply to How to change color of letters of highlighted text? on Thu, 15 Oct 2020 09:29:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/evgeny-morozov" aria-label="Profile: Evgeny-Morozov">@<bdi>Evgeny-Morozov</bdi></a></p>
<p dir="auto">You cannot set the foreground colour of the selection, only the background colour, this is so that any text that has been styled by one of the language lexers is not overridden.<br />
<img src="/assets/uploads/files/1602754161074-4ca166e9-43ca-4754-9436-94fc25be059f-image.png" alt="4ca166e9-43ca-4754-9436-94fc25be059f-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/58611</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/58611</guid><dc:creator><![CDATA[Nick Brown]]></dc:creator><pubDate>Thu, 15 Oct 2020 09:29:34 GMT</pubDate></item></channel></rss>