<?php
function auliettalite_custom_css()
{	
    $custom_css = "";

    if (get_theme_mod( 'auliettalite_accent_color' )) {
        $auliettalite_accent_color = get_theme_mod('auliettalite_accent_color');
        $auliettalite_accent_color_rgb = auliettalite_hex2rgb($auliettalite_accent_color);
        $custom_css .= "
            :root {
              --accent-color: {$auliettalite_accent_color};
              --accent-color-rgb : {$auliettalite_accent_color_rgb}
            }
        ";
    }
    if (get_theme_mod( 'auliettalite_secondary_color' )) {
        $auliettalite_secondary_color = get_theme_mod('auliettalite_secondary_color');
        $custom_css .= "
            :root {
              --color-secondary: {$auliettalite_secondary_color};
            }
        ";
    }

    wp_add_inline_style( 'auliettalite-theme-style', $custom_css );
}
add_action( 'wp_enqueue_scripts', 'auliettalite_custom_css', 15 );
