Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.hackathon.core.designsystem.theme.Gray400
import com.example.hackathon.core.designsystem.theme.Gray500
import com.example.hackathon.core.designsystem.theme.HackathonTheme
import com.example.hackathon.core.designsystem.util.noRippleClickable
import kotlin.enums.EnumEntries
Expand Down Expand Up @@ -74,7 +76,7 @@ fun BottomNavBar(
if (isSelected) {
HackathonTheme.colors.black
} else {
Color(0xFF8B91A1)
HackathonTheme.colors.iconUnselected
}
)
Text(
Expand All @@ -84,7 +86,7 @@ fun BottomNavBar(
if (isSelected) {
HackathonTheme.colors.black
} else {
Color(0xFF939DA9)
HackathonTheme.colors.labelUnselected
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ package com.example.hackathon.core.designsystem.component
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import com.example.hackathon.core.designsystem.icon.HackathonIcons
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.HorizontalDivider
Expand All @@ -17,8 +25,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Paint
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
Expand All @@ -28,6 +34,7 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import coil3.compose.AsyncImage
import com.example.hackathon.core.designsystem.icon.HackathonIcons
import com.example.hackathon.core.designsystem.theme.Gray50
import com.example.hackathon.core.designsystem.theme.Gray700
import com.example.hackathon.core.designsystem.theme.HackathonTheme
Expand Down Expand Up @@ -204,15 +211,15 @@ fun CombinationCard(
Text(
text = combination.description,
style = HackathonTheme.typography.Body_medium,
color = Color(0xFFC0C0C0),
color = HackathonTheme.colors.onSurfaceVariant,
maxLines = 2,
overflow = TextOverflow.Ellipsis
)
Spacer(modifier = Modifier.height(12.dp))

HorizontalDivider(
thickness = 0.5.dp,
color = Color(0xFFC0C0C0)
color = HackathonTheme.colors.onSurfaceVariant
)

Spacer(modifier = Modifier.height(12.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import androidx.compose.ui.graphics.Color
// Figma Design System Colors
// Primary Colors
val Primary = Color(0xFFE10818) // 빨간색 (Figma Primary)
val PrimaryDark = Color(0xFFC10714)

// Neutral Colors (Figma Design System)
val Black = Color(0xFF000000)
Expand All @@ -15,28 +14,23 @@ val Gray50 = Color(0xFFE0DCDC)
val Gray700 = Color(0xFF383838)
val Gray900 = Color(0xFF202020)

// 추가 그레이/표면 토큰 — 화면에 하드코딩돼 있던 Color(0xFF...) 정리 (#31)
val Gray200 = Color(0xFFCCCCCC)
val Gray300 = Color(0xFFC0C0C0)
val Gray400 = Color(0xFF939DA9)
val Gray500 = Color(0xFF8B91A1)
val Gray600 = Color(0xFF555555)
val SurfaceVariant = Color(0xFFF7F7F7)
val PrimaryContainer = Color(0xFFFFF3F3)

// Background Colors
val Background = Color(0xFFFFFFFF) // White background
val Surface = Color(0xFFFFFFFF)

// Text Colors
val TextPrimary = Color(0xFF000000) // Black
val TextSecondary = Color(0xFF383838) // Gray700

// Accent Colors
val Success = Color(0xFF2ECC71)
val Error = Color(0xFFE10818) // Primary red for errors

// Legacy colors (for compatibility - deprecated)
val Secondary = Color(0xFF1F2A44)
val SecondaryLight = Color(0xFF2A3A5A)
val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)
val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)

data class HackathonColors(
val primary: Color,
val black: Color,
Expand All @@ -47,7 +41,15 @@ data class HackathonColors(
val background: Color,
val surface: Color,
val success: Color,
val error: Color
val error: Color,
// #31 — 화면 하드코딩 색을 역할 기반 토큰으로 추가 (다크모드 도입 대비, 라이트/다크 공통 역할)
val iconUnselected: Color,
val labelUnselected: Color,
val onSurfaceVariant: Color,
val outline: Color,
val textSecondary: Color,
val surfaceVariant: Color,
val primaryContainer: Color
)

val defaultHackathonColors =
Expand All @@ -61,7 +63,14 @@ val defaultHackathonColors =
background = Background,
surface = Surface,
success = Success,
error = Error
error = Error,
iconUnselected = Gray500,
labelUnselected = Gray400,
onSurfaceVariant = Gray300,
outline = Gray200,
textSecondary = Gray600,
surfaceVariant = SurfaceVariant,
primaryContainer = PrimaryContainer
)

val LocalHackathonColors = staticCompositionLocalOf { defaultHackathonColors }
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fun LoginScreen(
lineHeight = 16.sp,
style = HackathonTheme.typography.Body_semibold,
fontWeight = FontWeight(500),
color = Color(0xFF000000),
color = HackathonTheme.colors.black,
textAlign = TextAlign.End
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
Expand All @@ -49,7 +48,6 @@ import com.example.hackathon.core.designsystem.icon.HackathonIcons
import com.example.hackathon.core.designsystem.theme.HackathonTheme
import com.example.hackathon.core.designsystem.theme.Primary
import com.example.hackathon.core.model.DummyData
import com.example.hackathon.feature.combination.DetailViewModel

@OptIn(ExperimentalMaterial3Api::class)
@Composable
Expand Down Expand Up @@ -259,7 +257,7 @@ fun DetailScreen(
Text(
text = authorText,
style = HackathonTheme.typography.Body_medium,
color = Color(0xFF555555),
color = HackathonTheme.colors.textSecondary,
modifier = Modifier.padding(bottom = 10.dp)
)

Expand Down Expand Up @@ -318,11 +316,11 @@ fun DetailScreen(
Modifier
.fillMaxWidth()
.background(
Color(0xFFF7F7F7),
HackathonTheme.colors.surfaceVariant,
shape = RoundedCornerShape(10.dp)
).border(
shape = RoundedCornerShape(10.dp),
color = Color(0xFFCCCCCC),
color = HackathonTheme.colors.outline,
width = 1.dp
).padding(horizontal = 20.dp, vertical = 15.dp)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import com.example.hackathon.core.designsystem.icon.HackathonIcons
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
Expand All @@ -27,7 +26,6 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.geometry.CornerRadius
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PaintingStyle.Companion.Stroke
import androidx.compose.ui.graphics.PathEffect
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.layout.ContentScale
Expand All @@ -36,6 +34,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import coil3.compose.AsyncImage
import com.example.hackathon.core.designsystem.R
import com.example.hackathon.core.designsystem.icon.HackathonIcons
import com.example.hackathon.core.designsystem.theme.Gray50
import com.example.hackathon.core.designsystem.theme.Gray700
import com.example.hackathon.core.designsystem.theme.HackathonTheme
Expand All @@ -47,6 +46,9 @@ fun ImageUploadSection(
onRemoveImage: (Uri) -> Unit,
modifier: Modifier = Modifier
) {
// drawBehind 는 비-Composable(DrawScope)이라 @Composable 게터인 HackathonTheme.colors 를 직접 못 쓴다.
// 색을 Composable 본문에서 미리 읽어 호이스팅한다.
val primaryColor = HackathonTheme.colors.primary
Column(
modifier = modifier,
verticalArrangement = Arrangement.spacedBy(8.dp)
Expand All @@ -64,7 +66,7 @@ fun ImageUploadSection(
val dashGap = 6.dp.toPx()

drawRoundRect(
color = Color(0xFFE10818).copy(alpha = 0.3f),
color = primaryColor.copy(alpha = 0.3f),
style =
Stroke(
width = strokeWidth,
Expand All @@ -76,7 +78,7 @@ fun ImageUploadSection(
cornerRadius = CornerRadius(12.dp.toPx())
)
}.background(
color = Color(0xFFFFF3F3),
color = HackathonTheme.colors.primaryContainer,
shape = RoundedCornerShape(12.dp)
).clickable { onImageClick() },
contentAlignment = Alignment.Center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.example.hackathon.core.designsystem.R
import com.example.hackathon.core.designsystem.theme.Gray700
import com.example.hackathon.core.designsystem.theme.HackathonTheme
import com.example.hackathon.feature.home.SearchViewModel
import com.example.hackathon.feature.home.component.CombinationList

@Composable
Expand Down Expand Up @@ -100,7 +99,7 @@ fun SearchScreen(
Icon(
painter = painterResource(R.drawable.ic_search),
contentDescription = "search",
tint = Color(0xFF8B91A1),
tint = HackathonTheme.colors.iconUnselected,
modifier =
Modifier.clickable {
viewModel.onSearch(uiState.query)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -56,12 +55,12 @@ fun SearchComponent(modifier: Modifier = Modifier, onSearchClick: () -> Unit) {
Icon(
painter = painterResource(R.drawable.ic_search),
contentDescription = "search component",
tint = Color(0xFF8B91A1)
tint = HackathonTheme.colors.iconUnselected
)
Text(
text = "오늘은 어떤 꿀조합을 찾고 싶으신가요?",
style = HackathonTheme.typography.Caption_medium,
color = Color(0xFF8B91A1)
color = HackathonTheme.colors.iconUnselected
)
}
}
Expand Down
Loading