wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php:153Adds a class to <body> if the background-color is dark.
$classesarrayarray public function body_class( $classes ) { $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); $luminance = self::get_relative_luminance_from_hex( $background_color ); if ( 127 > $luminance ) { $classes[] = 'is-dark-theme'; } else { $classes[] = 'is-light-theme'; } if ( 225 <= $luminance ) { $classes[] = 'has-background-white'; } return $classes; }Introduced in Twenty Twenty-One 1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.