Skip to content

Commit

Permalink
add: UIColor+Extension 추가 (TeamNADA#372)
Browse files Browse the repository at this point in the history
- 명함 만들기 버튼 배경 색의 평소와 선택시 컬러를 다크모드 대응하여 추가함
  • Loading branch information
hyun99999 committed Feb 20, 2023
1 parent cd5cdbc commit 24c6a6e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,34 @@ extension UIColor {
}
}

@nonobjc class var cardCreationUnclicked: UIColor {
if #available(iOS 13, *) {
return UIColor { (traitCollection: UITraitCollection) -> UIColor in
if traitCollection.userInterfaceStyle == .light {
return UIColor(red: 224.0 / 255.0, green: 232 / 255.0, blue: 239.0 / 255.0, alpha: 1.0)
} else {
return UIColor(red: 64.0 / 255.0, green: 70 / 255.0, blue: 79 / 255.0, alpha: 1.0)
}
}
} else {
return UIColor(red: 224.0 / 255.0, green: 232 / 255.0, blue: 239.0 / 255.0, alpha: 1.0)
}
}

@nonobjc class var cardCreationClicked: UIColor {
if #available(iOS 13, *) {
return UIColor { (traitCollection: UITraitCollection) -> UIColor in
if traitCollection.userInterfaceStyle == .light {
return UIColor(red: 202.0 / 255.0, green: 209 / 255.0, blue: 215.0 / 255.0, alpha: 1.0)
} else {
return UIColor(red: 45.0 / 255.0, green: 49 / 255.0, blue: 55 / 255.0, alpha: 1.0)
}
}
} else {
return UIColor(red: 224.0 / 255.0, green: 232 / 255.0, blue: 239.0 / 255.0, alpha: 1.0)
}
}

@nonobjc class var harmonyRed: UIColor {
return UIColor(red: 239.0 / 255.0, green: 115.0 / 255.0, blue: 115.0 / 255.0, alpha: 1.0)
}
Expand Down

0 comments on commit 24c6a6e

Please sign in to comment.