@@ -68,7 +68,8 @@ Loader {
6868 visible: showHeader && status == Loader.Ready;
6969 sourceComponent: ShaderEffect {
7070 id: overlay;
71− height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
71+ height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
72+ property real luminance: 0.2126 * overlayColor.r + 0.7152 * overlayColor.g + 0.0722 * overlayColor.b;
7273 property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";
7374 property var source: ShaderEffectSource {
7475 id: shaderSource;
@@ -113,7 +114,7 @@ Label {
113114 wrapMode: Text.Wrap;
114115 maximumLineCount: 2;
115116 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
116− color: "white";
117+ color: overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
117118 visible: showHeader && overlayLoader.active;
118119 text: root.title;
119120 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -132,7 +133,7 @@ Label {
132133 elide: Text.ElideRight;
133134 fontSize: "small";
134135 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
135− color: "white";
136+ color: overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
136137 visible: titleLabel.visible && titleLabel.text;
137138 text: cardData && cardData["subtitle"] || "";
138139 font.weight: Font.Light;