@php $scheme = $general_setting->mobile_theme_scheme ?? 'green'; $colors = [ 'green' => [ 'bg_body' => '#dff9fb', 'bg_nav' => '#ffffff', 'color_nav' => '#32745e', 'color_nav_active' => '#58907D', 'bg_indicator' => '#32745e', 'color_nav_hover' => '#3ab58c', ], 'blue' => [ 'bg_body' => '#e3f2fd', 'bg_nav' => '#ffffff', 'color_nav' => '#0d47a1', 'color_nav_active' => '#1976d2', 'bg_indicator' => '#0d47a1', 'color_nav_hover' => '#2196f3', ], 'red' => [ 'bg_body' => '#ffebee', 'bg_nav' => '#ffffff', 'color_nav' => '#b71c1c', 'color_nav_active' => '#d32f2f', 'bg_indicator' => '#b71c1c', 'color_nav_hover' => '#ef5350', ], 'purple' => [ 'bg_body' => '#f3e5f5', 'bg_nav' => '#ffffff', 'color_nav' => '#4a148c', 'color_nav_active' => '#7b1fa2', 'bg_indicator' => '#4a148c', 'color_nav_hover' => '#ab47bc', ], 'orange' => [ 'bg_body' => '#fff3e0', 'bg_nav' => '#ffffff', 'color_nav' => '#e65100', 'color_nav_active' => '#f57c00', 'bg_indicator' => '#e65100', 'color_nav_hover' => '#ff9800', ], 'rose' => [ 'bg_body' => '#fff5f7', 'bg_nav' => '#ffffff', 'color_nav' => '#ce8291', 'color_nav_active' => '#ef95a6', 'bg_indicator' => '#ce8291', 'color_nav_hover' => '#ef95a6', ], 'dark' => [ 'bg_body' => '#121212', 'bg_nav' => '#1e1e1e', 'color_nav' => '#e0e0e0', // Light text 'color_nav_active' => '#bb86fc', // Purple accent 'bg_indicator' => '#bb86fc', 'color_nav_hover' => '#cf6679', ], ]; $c = $colors[$scheme] ?? $colors['green']; if (!function_exists('hexToRgb')) { function hexToRgb($hex) { $hex = str_replace('#', '', $hex); if (strlen($hex) == 3) { $r = hexdec(substr($hex, 0, 1) . substr($hex, 0, 1)); $g = hexdec(substr($hex, 1, 1) . substr($hex, 1, 1)); $b = hexdec(substr($hex, 2, 1) . substr($hex, 2, 1)); } else { $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); } return "$r, $g, $b"; } } @endphp