Esempio n. 1
0
<?php

require_once __DIR__ . '/../class-phpcolors.php';
// This class lets us lighten/darken Hex Colors using HSL, just like SASS.
$primary_color = get_theme_mod('mullins_primary_color', '#094C8B');
$primary_color_object = new Mexitek\PHPColors\Color($primary_color);
$secondary_color = get_theme_mod('mullins_secondary_color', '#C31A2F');
$secondary_color_object = new Mexitek\PHPColors\Color($secondary_color);
$accent_1 = get_theme_mod('mullins_accent_1', '#ebebeb');
$accent_1_object = new Mexitek\PHPColors\Color($accent_1);
$accent_2 = get_theme_mod('mullins_accent_2', '#D6E0EB');
$accent_2_object = new Mexitek\PHPColors\Color($accent_2);
$background = get_theme_mod('mullins_background', '#ffffff');
$background_object = new Mexitek\PHPColors\Color($background);
?>

<style type = "text/css">
    
    /* General */
    
    a, .phone-number .fa, a .fa {
        color: <?php 
echo $primary_color;
?>
;
    }
    
    a:hover, .phone-number:hover .fa, a:hover .fa {
        color: <?php 
echo $secondary_color;
?>
 /**
  * Must-implement function from interface. Returns modified value.
  * @param  string $in input hex-dec color code
  * @return string     hex-dex lighter variant
  */
 public function modify($in)
 {
     $color = new \Mexitek\PHPColors\Color($in);
     return '#' . $color->lighten($this->lighten);
 }