@php // Determine theme color: prefer gallery's photo box setting, fallback to global setting $themeColor = null; try { $themeColor = $gallery->photoBox->settings['theme_color'] ?? null; } catch (\Throwable $e) { $themeColor = null; } if (empty($themeColor)) { $themeColor = \App\Models\Settings::getSettings('theme_color', '#000000'); } if (empty($themeColor)) { $themeColor = '#000000'; } // Compute readable text color (black or white) based on luminance $hex = ltrim($themeColor, '#'); if (strlen($hex) === 3) { $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2]; } $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); $luminance = (0.2126 * $r + 0.7152 * $g + 0.0722 * $b) / 255; $textColor = $luminance > 0.6 ? '#000000' : '#ffffff'; @endphp
Silakan simpan foto-foto kenanganmu di bawah ini.
Sepertinya belum ada media yang diupload ke galeri ini.
Terima kasih sudah berfoto di
{{ config('app.name') }} ! 📸