How to change clickable link color to a lighter one when background is now black?
Hi. I've started using NP++ 5.4.5 and am loving it.
For reasons I won't go into, I've had to change the default text color to white and the background to black. The only color I can't change is the clickable link, which turns dark underlined blue when I hover over it. The darkness of the blue link would be fine if the background was white, but now it's very difficult to see. Is there some way of changing it to, say, cyan? I've changed several other colors but can't find where to change this one.
Of course, if I disable the clickable link feature, I can set its color to whatever I want, but then it's no longer clickable. Surely there must be a solution to this.
Thanks for any help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To add to this, I found in %Appdata% the file stylers.xml which contains a lot of styleIDs, but cannot find styleID="30" here. What should I do? create a file?, alter an existing file? Any help on this please.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You must not add anything to stylers.xml or a theme file.
What you'll have to do is to add a macro definition to shortcuts.xml. Then change the color by running the macro.
Open shortcuts.xml in a different editor - M$ Notepad is good enough - , locate the <Macros> tag and, right below it, paste this:
<Macro name="colorHSred" Ctrl="Yes" Alt="Yes" Shift="No" Key="100">
<Action type="0" message="2051" wParam="30" lParam="255"/>
</Macro>
Save and close the other editor. Open Notepad++. Now you have a new macro listed in the macro menu. It is called colorHSred and is bound to Ctrl+Alt+Numpad4. You can change these properties from the Shortcut mapper.
Executing the macro will cause clickable links to display in red.
Changing the colour is done by changing the lParam value. A similar macro wth a different message will control the background colour. The colour value is 65;536*Blue+ 256 * Green + Red, where Red, Green and Blue are amounts of red, green and blue needed to make the colour. they all three are integers between 0 and 255.
The same macro definition with message="2052" will change the background of the link.
Before editing shortcuts.xml, back it up, one never knows.
Following our discussion on IRC, I'll check what is the style used when hovering over the link.
HTH
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Follow-up:
The ollowing macro definition will set the foregound colour for hovered clickable links to green:<Macro name="colorAHSgreen" Ctrl="Yes" Alt="Yes" Shift="No" Key="101">
<Action type="0" message="2410" wParam="1" lParam="65280" sParam=""/>
</Macro>
Changing 2410 to 2411 will similarly adjust the background colour.
Remember that colours are in BGR format: most significant bits are for blue, middle ones for green and lesat significant ones for red.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have coded exactly that in my own version. The configurable highlighting has not made it to Don's version (yet...).
You can get the sources from git at git://github.com/joce/notepad-plus.git . Branch name is IncludeRedux
Alternatively, you can download the sources from the web at: http://github.com/joce/notepad-plus/commit/2ec83c6172600a9f750394f88bb400118217a016
joce.
joce
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to change clickable link color to a lighter one when background is now black?
Hi. I've started using NP++ 5.4.5 and am loving it.
For reasons I won't go into, I've had to change the default text color to white and the background to black. The only color I can't change is the clickable link, which turns dark underlined blue when I hover over it. The darkness of the blue link would be fine if the background was white, but now it's very difficult to see. Is there some way of changing it to, say, cyan? I've changed several other colors but can't find where to change this one.
Of course, if I disable the clickable link feature, I can set its color to whatever I want, but then it's no longer clickable. Surely there must be a solution to this.
Thanks for any help.
Ask for this on IdeaTorrent.
You can design a synthetic macro to perform the modification. The styleID for hotspots, ie clickable links, is 30.
CChris
"The styleID for hotspots, ie clickable links, is 30"
Thanks. I'm still a beginner. Can you tell me where is the file where I can change this styleID?? Or where I can learn more about how to do thid?
To add to this, I found in %Appdata% the file stylers.xml which contains a lot of styleIDs, but cannot find styleID="30" here. What should I do? create a file?, alter an existing file? Any help on this please.
To avoid confusion, I deleted my earlier reply.
You must not add anything to stylers.xml or a theme file.
What you'll have to do is to add a macro definition to shortcuts.xml. Then change the color by running the macro.
Open shortcuts.xml in a different editor - M$ Notepad is good enough - , locate the <Macros> tag and, right below it, paste this:
<Macro name="colorHSred" Ctrl="Yes" Alt="Yes" Shift="No" Key="100">
<Action type="0" message="2051" wParam="30" lParam="255"/>
</Macro>
Save and close the other editor. Open Notepad++. Now you have a new macro listed in the macro menu. It is called colorHSred and is bound to Ctrl+Alt+Numpad4. You can change these properties from the Shortcut mapper.
Executing the macro will cause clickable links to display in red.
Changing the colour is done by changing the lParam value. A similar macro wth a different message will control the background colour. The colour value is 65;536*Blue+ 256 * Green + Red, where Red, Green and Blue are amounts of red, green and blue needed to make the colour. they all three are integers between 0 and 255.
The same macro definition with message="2052" will change the background of the link.
Before editing shortcuts.xml, back it up, one never knows.
Following our discussion on IRC, I'll check what is the style used when hovering over the link.
HTH
CChris
Follow-up:
The ollowing macro definition will set the foregound colour for hovered clickable links to green:<Macro name="colorAHSgreen" Ctrl="Yes" Alt="Yes" Shift="No" Key="101">
<Action type="0" message="2410" wParam="1" lParam="65280" sParam=""/>
</Macro>
Changing 2410 to 2411 will similarly adjust the background colour.
Remember that colours are in BGR format: most significant bits are for blue, middle ones for green and lesat significant ones for red.
CChris
I have coded exactly that in my own version. The configurable highlighting has not made it to Don's version (yet...).
You can get the sources from git at git://github.com/joce/notepad-plus.git . Branch name is IncludeRedux
Alternatively, you can download the sources from the web at:
http://github.com/joce/notepad-plus/commit/2ec83c6172600a9f750394f88bb400118217a016
joce.
joce