File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/documentation/src/components/ColorsAndTheming/ThemeBuilder Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ interface CSSVariable {
1212 value : CSSVariableValue ;
1313}
1414
15- function isBestColorWhite ( color : HexString ) : boolean {
15+ function isWhiteHighestContrast ( color : HexString ) : boolean {
1616 const lightRatio = getContrastRatio ( color , "#fff" ) ;
1717 const darkRatio = getContrastRatio ( color , "#000" ) ;
1818
@@ -43,7 +43,7 @@ export default function useThemeVariables(
4343 ] ;
4444
4545 if ( primaryColor ) {
46- if ( isBestColorWhite ( primaryColor ) ) {
46+ if ( isWhiteHighestContrast ( primaryColor ) ) {
4747 variables . push ( {
4848 name : "--rmd-theme-on-primary" ,
4949 value : "#fff" ,
@@ -52,7 +52,7 @@ export default function useThemeVariables(
5252 }
5353
5454 if ( secondaryColor ) {
55- if ( isBestColorWhite ( secondaryColor ) ) {
55+ if ( isWhiteHighestContrast ( secondaryColor ) ) {
5656 variables . push ( {
5757 name : "--rmd-theme-on-secondary" ,
5858 value : "#fff" ,
You can’t perform that action at this time.
0 commit comments