Text color changes based on author color
This commit is contained in:
parent
d881cefbc9
commit
228543a30e
|
@ -208,11 +208,18 @@ function OUTER(gscope)
|
||||||
bgcolor = fadeColor(bgcolor, info.fade);
|
bgcolor = fadeColor(bgcolor, info.fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
// Text color
|
||||||
getAuthorClassName(author))).backgroundColor = bgcolor;
|
var txtcolor = (colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.45) ? '#ffffff' : '#000000';
|
||||||
|
|
||||||
dynamicCSSTop.selectorStyle(getAuthorColorClassSelector(
|
var authorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
||||||
getAuthorClassName(author))).backgroundColor = bgcolor;
|
getAuthorClassName(author)));
|
||||||
|
authorStyle.backgroundColor = bgcolor;
|
||||||
|
authorStyle.color = txtcolor;
|
||||||
|
|
||||||
|
var authorStyleTop = dynamicCSSTop.selectorStyle(getAuthorColorClassSelector(
|
||||||
|
getAuthorClassName(author)));
|
||||||
|
authorStyleTop.backgroundColor = bgcolor;
|
||||||
|
authorStyleTop.color = txtcolor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue