<?php
$id = auth('id');
if (!function_exists('hex2rgb')) {
    function hex2rgb($color)
    {
        $color = str_replace('#', '', (string)$color);
        if (strlen($color) == 3) {
            $r = hexdec(str_repeat(substr($color, 0, 1), 2));
            $g = hexdec(str_repeat(substr($color, 1, 1), 2));
            $b = hexdec(str_repeat(substr($color, 2, 1), 2));
        } elseif (strlen($color) == 6) {
            $r = hexdec(substr($color, 0, 2));
            $g = hexdec(substr($color, 2, 2));
            $b = hexdec(substr($color, 4, 2));
        } else {
            return '0,0,0';
        }
        return $r . ',' . $g . ',' . $b;
    }
}
$my_color_val = isset($this->my_info['colors']) && !empty(trim($this->my_info['colors'])) ? trim($this->my_info['colors']) : '29C7AC';
$my_color = str_replace('#', '', $my_color_val);
$my_color_rgb  = hex2rgb($my_color);
?>
<style>
    .skin-black-light .sidebar-menu>li.active>a {
        background: rgba(<?= $my_color_rgb; ?>, .1) !important;
        color: #<?= $my_color; ?> !important;
    }

    .skin-black-light .sidebar-menu .treeview-menu>li.active>a {
        color: #<?= $my_color; ?> !important;
    }

    .skin-black-light .sidebar-menu>li>.treeview-menu li.active,
    .sidebar-menu>li.active>a {
        border-left: 3px solid rgba(<?= $my_color_rgb; ?>, .8) !important;
    }

    .skin-black-light .sidebar-menu .treeview-menu>li>a:hover {
        background: rgba(<?= $my_color_rgb; ?>, .1) !important;
        color: rgba(<?= $my_color_rgb; ?>, 1) !important;
    }

    .skin-black-light .sidebar-menu .treeview-menu>li.active>a i {
        color: #<?= $my_color; ?> !important;
    }
</style>