Changeset 49728 for branches/5.6/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php
- Timestamp:
- 12/01/2020 07:25:43 PM (4 years ago)
- Location:
- branches/5.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
-
branches/5.6/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php
r49574 r49728 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.