a tool for shared writing and social publishing

the last commit didn't actually do what i said it did, this one does lol

+12 -2
+12 -2
components/ThemeManager/ThemeProvider.tsx
··· 88 88 }) { 89 89 let bgLeaflet = useColorAttribute(props.entityID, "theme/page-background"); 90 90 let bgPage = useColorAttribute(props.entityID, "theme/card-background"); 91 + let showPageBackground = !useEntity( 92 + props.entityID, 93 + "theme/card-border-hidden", 94 + )?.data.value; 91 95 let primary = useColorAttribute(props.entityID, "theme/primary"); 92 96 93 97 let highlight1 = useEntity(props.entityID, "theme/highlight-1"); ··· 99 103 // set accent contrast to the accent color that has the highest contrast with the page background 100 104 let accentContrast = [accent1, accent2].sort((a, b) => { 101 105 return ( 102 - getColorContrast(colorToString(b, "rgb"), colorToString(bgPage, "rgb")) - 103 - getColorContrast(colorToString(a, "rgb"), colorToString(bgPage, "rgb")) 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 + ) 104 114 ); 105 115 })[0]; 106 116