OptionTree: change background color for content
-
Hueman is without a doubt one of the best themes available for wordpress. And so, I like to contribute a little feature which I miss in the current version; the ability to change the background color of the content section.
add to functions\theme-options.php
// Styling: Content Color array( 'id' => 'color-content', 'label' => 'Content Color', 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'styling', 'class' => '' ),
add to functions\dynamic-styles.php in alx_dynamic_css() where dynamic-styles != ‘off’
$color_content = ot_get_option('color-content'); $color_content_rgb = alx_hex2rgb($color_content, true); if ( $color_content != '#ffffff' ) { // background color $styles .= '.main, .page-title { background-color: '.$color_content.' !important; }'; $color_content_luminance = 0.299 * $color_content_rgb[0] + 0.587 * $color_content_rgb[1] + 0.114 * $color_content_rgb[2]; if ($color_content_luminance > 128) { // separator color on bright background $styles .= '.page-title, .featured, .post-list .post-row { border-bottom-color: rgba(160, 160, 160, .25); }'; } else { // separator color on dark background $styles .= '.page-title, .featured, .post-list .post-row { border-bottom-color: rgba(240, 240, 240, .25); }'; } }
Maybe something similar could be officially added in a future version of the theme.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘OptionTree: change background color for content’ is closed to new replies.