Changeset 49726 for trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php
- Timestamp:
- 12/01/2020 07:07:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php
r49574 r49726 169 169 public function body_class( $classes ) { 170 170 $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); 171 if ( 127 > self::get_relative_luminance_from_hex( $background_color ) ) { 171 $luminance = self::get_relative_luminance_from_hex( $background_color ); 172 173 if ( 127 > $luminance ) { 172 174 $classes[] = 'is-dark-theme'; 173 175 } else { … … 175 177 } 176 178 177 if ( 'ffffff' === strtolower( $background_color )) {179 if ( 225 <= $luminance ) { 178 180 $classes[] = 'has-background-white'; 179 181 }
Note: See TracChangeset
for help on using the changeset viewer.