> 0x10);
$rgbArray['green'] = 0xFF & ($colorVal >> 0x8);
$rgbArray['blue'] = 0xFF & $colorVal;
} elseif (strlen($hexStr) == 3) { //if shorthand notation, need some string manipulations
$rgbArray['red'] = hexdec(str_repeat(substr($hexStr, 0, 1), 2));
$rgbArray['green'] = hexdec(str_repeat(substr($hexStr, 1, 1), 2));
$rgbArray['blue'] = hexdec(str_repeat(substr($hexStr, 2, 1), 2));
} else {
return false; //Invalid hex color code
}
return $returnAsString ? implode($seperator, $rgbArray) : $rgbArray; // returns the rgb string or the associative array
}
$front_bg_image = avis_get_option($avis_shortname."_home_bgimage");
if(avis_get_option($avis_shortname.'_primary_color_scheme')){ $_primary_color_scheme = esc_attr(avis_get_option($avis_shortname.'_primary_color_scheme')); }
if(avis_get_option($avis_shortname.'_colorpicker')){ $color_scheme = esc_attr(avis_get_option($avis_shortname.'_colorpicker')); }
if(avis_get_option($avis_shortname.'_bread_background')){ $_bread_background = avis_get_option($avis_shortname.'_bread_background'); }
if(avis_get_option($avis_shortname.'_logo_width')){ $avis_logo_wdth = esc_attr(avis_get_option($avis_shortname.'_logo_width')); }
if(avis_get_option($avis_shortname.'_logo_height')){ $avis_logo_hght = esc_attr(avis_get_option($avis_shortname.'_logo_height')); }
if(is_page() || is_search() || is_home() || is_404() || is_front_page() || is_archive()) {
$_bread_background = avis_bg_style(avis_get_option($avis_shortname.'_bread_background'));
}
if(is_page() || is_singular()) {
$_pagetitle_bg = avis_bg_style(get_post_meta($post->ID, '_pagetitle_bg', true));
$_bread_background = avis_bg_style(avis_get_option($avis_shortname.'_bread_background'));
}
$rgb=array();
$rgb = avis_skeHex2RGB($color_scheme);
$R = $rgb['red'];
$G = $rgb['green'];
$B = $rgb['blue'];
$rgbcolor = "rgba(". $R .",". $G .",". $B .",.4)";
$bdrrgbcolor = "rgba(". $R .",". $G .",". $B .",.7)";
$hrgb = avis_skeHex2RGB($_primary_color_scheme);
$hR = $hrgb['red'];
$hG = $hrgb['green'];
$hB = $hrgb['blue'];
$hrgbcolor = "rgba(". $hR .",". $hG .",". $hB .",.7)";
?>