···88}) {
89 let bgLeaflet = useColorAttribute(props.entityID, "theme/page-background");
90 let bgPage = useColorAttribute(props.entityID, "theme/card-background");
000091 let primary = useColorAttribute(props.entityID, "theme/primary");
9293 let highlight1 = useEntity(props.entityID, "theme/highlight-1");
···99 // set accent contrast to the accent color that has the highest contrast with the page background
100 let accentContrast = [accent1, accent2].sort((a, b) => {
101 return (
102- getColorContrast(colorToString(b, "rgb"), colorToString(bgPage, "rgb")) -
103- getColorContrast(colorToString(a, "rgb"), colorToString(bgPage, "rgb"))
000000104 );
105 })[0];
106
···88}) {
89 let bgLeaflet = useColorAttribute(props.entityID, "theme/page-background");
90 let bgPage = useColorAttribute(props.entityID, "theme/card-background");
91+ let showPageBackground = !useEntity(
92+ props.entityID,
93+ "theme/card-border-hidden",
94+ )?.data.value;
95 let primary = useColorAttribute(props.entityID, "theme/primary");
9697 let highlight1 = useEntity(props.entityID, "theme/highlight-1");
···103 // set accent contrast to the accent color that has the highest contrast with the page background
104 let accentContrast = [accent1, accent2].sort((a, b) => {
105 return (
106+ getColorContrast(
107+ colorToString(b, "rgb"),
108+ colorToString(showPageBackground ? bgPage : bgLeaflet, "rgb"),
109+ ) -
110+ getColorContrast(
111+ colorToString(a, "rgb"),
112+ colorToString(showPageBackground ? bgPage : bgLeaflet, "rgb"),
113+ )
114 );
115 })[0];
116