From 337af34bc815395f9985e0f6ebd2b0bc2c15dacd Mon Sep 17 00:00:00 2001 From: Tom Solchan Ahn Date: Fri, 23 Dec 2022 18:02:57 +0900 Subject: [PATCH] =?UTF-8?q?[Improvement]=20Custom=20Color=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20(#2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/BezierSwift/Foundation/Color/SemanticColor.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/BezierSwift/Foundation/Color/SemanticColor.swift b/Sources/BezierSwift/Foundation/Color/SemanticColor.swift index 49892b9d..21029162 100644 --- a/Sources/BezierSwift/Foundation/Color/SemanticColor.swift +++ b/Sources/BezierSwift/Foundation/Color/SemanticColor.swift @@ -138,6 +138,7 @@ public enum SemanticColor { case bgtxtNavyLight case bgtxtNavyNormal case bgtxtNavyDark + case custom(PaletteSet) } // MARK: Light, Dark Color @@ -148,7 +149,9 @@ extension SemanticColor { // MARK: Palette Set extension SemanticColor { - private var paletteSet: (Color, Color) { + public typealias PaletteSet = (Color, Color) + + private var paletteSet: PaletteSet { switch self { // MARK: - Background case .bgWhiteHigh: return (Palette.white, Palette.grey700) @@ -280,6 +283,7 @@ extension SemanticColor { case .bgtxtNavyLight: return (Palette.navy400_30, Palette.navy300_40) case .bgtxtNavyNormal: return (Palette.navy400, Palette.navy300) case .bgtxtNavyDark: return (Palette.navy500, Palette.navy400) + case .custom(let paletteSet): return (paletteSet.0, paletteSet.1) } } }