Alternative Light/Dark mode colors for file/folder infotips

Before:
2023-10-30_163708-
After:
2023-10-30_163708

If you have any custom defined colors in your infotips/tooltips such as this one below...

Description:\ <#324FE1>{userdesc}</#>

The color defined above will be used in dark and light mode. Replace this line with the 1 line method below to define alternative colors for light/dark mode.


2 line method (from inital post, use 1 line method instead)

You can swap the single line above with the two lines below to define alternative colors for each mode.

{!= if (SysInfo("DarkMode") == true && IsSet(userdesc)) return true; else return false; =}Description:\	<#569CD6>{userdesc}</#>{!}
{!= if (SysInfo("DarkMode") == false && IsSet(userdesc)) return true; else return false; =}Description:\	<#324FE1>{userdesc}</#>{!}

:warning: Important: Each evaluator hide section (contained in {!= ... =} ... {!}) must each be on a single line when pasting within the 'Info Tip' tab.

The above two lines have one evaluator hide section per line, when one is hidden the other is visible. The order of the two lines do not matter. If swapped, results would be the same.

The if statements are comparing with true and false to make it a bit easier to read for the non-programmer. The first line in the two evaluator hide sections above is defining the dark mode color (hexadecimal <#569CD6>), the second line the light mode color.


Revised 1 line method Thanks to Leo .

Description:\ <#{=SysInfo("DarkMode")?"569CD6":"324FE1"=}>{userdesc}</#>

Can also be done like this, without needing to duplicate the line:

Color test: <#{=SysInfo("DarkMode")?"FF0000":"0000FF"=}>Hello World</#>

image

image

You can also refer to most colors in Preferences, so the tooltip matches the current theme. For example:

Color test: <#%url_normal>Hello World</#>

To get the appropriate name/code, right-click a color in Preferences and choose "Copy markup code":

Nice! I see how you inserted it right into the color code tag. I will update the OP in accordance to this one liner awesomeness.

1 Like