Luci statistics has wrong colors in dark mode

Luci statistics looks wrong in dark mode:
1.legend colors do not correspond to graph colors
2.legend colors are too similar
3.grid is to prominent

Dark mode:

Light mode:

(latest version: git-23.184.27766-2c7b34b)

My best guess is that rrdtool graph is being called somewhere with a transparent background. Maybe in /www/luci-static/resources/statistics/rrdtool.js, that function with var cmdline=['graph','-','-a','PNG',...???

I tried hacking in '-c','BACK:ff0000ff', but it didn't change the graph background, maybe something is cached somewhere...

(https://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html see --color entry)

For the lack of better options, the original bright image files are simply color-rotated using a CSS filter. There's no simple solution apart from showing bright color images in the dark theme or having a completely different code path for generating dark images (which in itself is problematic since the graphing application has no concept of "light" or "dark" themes).

1 Like