@php $colors = \App\Models\Setting::getThemeColors(); // Helper function to adjust color lightness $adjustLightness = function($hex, $percent) { $hex = str_replace('#', '', $hex); $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); $r = max(0, min(255, (int)($r + (255 - $r) * $percent / 100))); $g = max(0, min(255, (int)($g + (255 - $g) * $percent / 100))); $b = max(0, min(255, (int)($b + (255 - $b) * $percent / 100))); return '#' . str_pad(dechex($r), 2, '0', STR_PAD_LEFT) . str_pad(dechex($g), 2, '0', STR_PAD_LEFT) . str_pad(dechex($b), 2, '0', STR_PAD_LEFT); }; @endphp