ghostfolio icon indicating copy to clipboard operation
ghostfolio copied to clipboard

[FEATURE] Improve font color assignment in treemap chart component

Open dtslvr opened this issue 1 year ago • 1 comments

Currently the font color assignment of the treemap chart component is static (white).

From now on, the font colors should be assigned dynamically depending on the background color to improve the contrast.

  • For background index 0 - 4, the font color 9 should be used (e.g. red[3]red[9])
  • For background index 5 - 9, the font color 0 should be used (e.g. green[6]green[0])
  • For background color gray[3], the font color gray[9] should be used

Extract the logic from the background assignment and reuse it for the font color assignment.

dtslvr avatar Oct 19 '24 08:10 dtslvr

hey @dtslvr can I take this one?

VeerChaurasia avatar Oct 19 '24 08:10 VeerChaurasia