ChartJS Theming

I need a suggestion on changing ChartJS legend font colors. By default the legend colors are a light grey. The only way I have been able to change the color is with New-UDChartJS -Options @{legend = @{labels = @{fontColor = ‘#ffffff’}}}. I would like to provide users the ability to switch light/dark theme and to change the legend colors based on the selection.

Is there a way to detect which theme was selected?
Is there a better way to handle the legend font color for a dark/light theme change?