I'm trying to output a single color to use in a CSS variable, but am unable to output the color value in HSL. I can get it to output HEX and RGBa, but not HSL.
In the field group I have the color picker option "mode" set to "hsl".
Here's the function I'm calling in functions.php within WP:
function my_header_hook() {
$post_color = rwmb_meta(post_color_theme);
if ($post_color) {
echo '<style type="text/css">
:root{
--post-color:'.$post_color.';
</style>';
}
}
add_action( 'wp_head', 'my_header_hook' );