3 import
QtQuick.Controls.Material 2.3
31 function accentTextColor(accentColor, baseColor) {
32 var a = (0.299 * accentColor.r + 0.587 * accentColor.g + 0.144 * accentColor.b);
33 if(typeof baseColor !==
"undefined") {
34 var b = (0.299 * baseColor.r + 0.587 * baseColor.g + 0.144 * baseColor.b);
35 if (Math.abs(a - b) >= 0.5)
44 Material.foreground: accentTextColor(Material.primary)