Problem:
In the Favorites Tree Panel & Tree Panel, I can't see the "Expand Branch" and "Outline" symbols.
I have always used a black background for all editors and focused lists, which is similar to a "Dark-Theme" of modern applications.
When focused, the "Expand Branch" symbols are not visible, and the "Outline" symbols are barely visible.
When not focused, the "Expand Branch" symbols are visible, and the "Outline" symbols are not visible.
Solution:
- Consider adding a colour definition to settings.
- Or, adjust the "Expand Branch" color to match the "Outline" color
- Or preferably, adjust the "Expand Branch" color & "Outline" colors to automatically contrast against the chosen background color brightness. (See end of post for brightness related info.)
Code: Select all
if brightnessPercent < 15 then setSymbolColor("Grey70") -- Very dark background → light grey text elseif brightnessPercent < 35 then setSymbolColor("Grey60") -- Dark background → medium-light text elseif brightnessPercent < 50 then setSymbolColor("Grey40") -- Mid-dark background → medium text elseif brightnessPercent < 70 then setSymbolColor("Grey20") -- Mid-light background → darker text elseif brightnessPercent < 85 then setSymbolColor("Grey10") -- Light background → very dark text else setSymbolColor("Black") -- Very light background → pure black text end
"Expand Branch" symbols are not visible. "Outline" symbols are barely visible.
- On Favorites Tree with black background - the Expand Branch (and Outline) symbols are near black and are not visible.
- https://app.box.com/s/znp2eirei35plqymxie7rw6lpbr3aa13 (if image below is not visible)

"Expand Branch" symbols & "Outline" symbols are still visible.
- On Favorites Tree with blue background - the Expand Branch (and Outline) symbols are near black but are still visible.
- https://app.box.com/s/8hzriqdjo60vrk3bio6jp7ctul1if2kh (if image below is not visible)

According to CoPilot AI:
To determine the "brightness percentage" of a background color in a UI, you can use a perceptual formula that converts RGB values into a single luminance value—essentially estimating how bright the color appears to the human eye.
Assuming your color is defined as:
Code: Select all
local r, g, b = 120, 200, 255 -- Example RGB valuesCode: Select all
local brightness = (0.299 * r + 0.587 * g + 0.114 * b) / 255
local brightnessPercent = math.floor(brightness * 100 + 0.5)
- The result is a percentage from 0 to 100.
- `0%` = pure black, `100%` = pure white.
- This formula reflects how humans perceive brightness—green contributes most, blue least.
- You can use this to auto-adjust text color (e.g., switch to white text on dark backgrounds).
- It helps with accessibility, ensuring contrast ratios meet WCAG standards.
- You can also use it to fade or highlight UI elements based on background brightness.
Code: Select all
function GetBrightnessPercent(r, g, b)
local luminance = 0.299 * r + 0.587 * g + 0.114 * b
return math.floor((luminance / 255) * 100 + 0.5)
end