|
| 1 | +package com.hackeros.app.ui.theme |
| 2 | + |
| 3 | +import androidx.compose.ui.graphics.Color |
| 4 | +import com.hackeros.app.data.model.AppTheme |
| 5 | +import com.hackeros.app.data.model.ThemeId |
| 6 | + |
| 7 | +// All themes matching the React app |
| 8 | +val THEMES: Map<ThemeId, AppTheme> = mapOf( |
| 9 | + ThemeId.HACKER to AppTheme( |
| 10 | + id = ThemeId.HACKER, |
| 11 | + primary = 0xFF10B981, // Emerald 500 |
| 12 | + background = 0xFF0A0A0C, |
| 13 | + card = 0xFF17171C |
| 14 | + ), |
| 15 | + ThemeId.CYBERPUNK to AppTheme( |
| 16 | + id = ThemeId.CYBERPUNK, |
| 17 | + primary = 0xFFEC4899, // Pink 500 |
| 18 | + background = 0xFF1C0814, |
| 19 | + card = 0xFF2E1022 |
| 20 | + ), |
| 21 | + ThemeId.OCEAN to AppTheme( |
| 22 | + id = ThemeId.OCEAN, |
| 23 | + primary = 0xFF06B6D4, // Cyan 500 |
| 24 | + background = 0xFF081420, |
| 25 | + card = 0xFF0F2337 |
| 26 | + ), |
| 27 | + ThemeId.SUNSET to AppTheme( |
| 28 | + id = ThemeId.SUNSET, |
| 29 | + primary = 0xFFF97316, // Orange 500 |
| 30 | + background = 0xFF1C0A05, |
| 31 | + card = 0xFF32140A |
| 32 | + ), |
| 33 | + ThemeId.MATRIX to AppTheme( |
| 34 | + id = ThemeId.MATRIX, |
| 35 | + primary = 0xFF22C55E, // Green 500 |
| 36 | + background = 0xFF000000, |
| 37 | + card = 0xFF141414 |
| 38 | + ), |
| 39 | + ThemeId.CRIMSON to AppTheme( |
| 40 | + id = ThemeId.CRIMSON, |
| 41 | + primary = 0xFFDC2626, // Red 600 |
| 42 | + background = 0xFF140505, |
| 43 | + card = 0xFF280A0A |
| 44 | + ), |
| 45 | + ThemeId.ROYAL to AppTheme( |
| 46 | + id = ThemeId.ROYAL, |
| 47 | + primary = 0xFFEAB308, // Yellow 500 |
| 48 | + background = 0xFF0F0F0F, |
| 49 | + card = 0xFF1E1E1E |
| 50 | + ) |
| 51 | +) |
| 52 | + |
| 53 | +fun Color.Companion.fromLong(value: Long) = Color(value) |
| 54 | + |
| 55 | +fun AppTheme.primaryColor() = Color(primary) |
| 56 | +fun AppTheme.backgroundColor() = Color(background) |
| 57 | +fun AppTheme.cardColor() = Color(card) |
| 58 | +fun AppTheme.textColor() = Color(0xFFF1F5F9) // Slate 100 |
| 59 | +fun AppTheme.mutedColor() = Color(0xFF94A3B8) // Slate 400 |
| 60 | +fun AppTheme.surfaceColor() = Color(background).copy(alpha = 0.5f) |
0 commit comments