From 4ba8d004d1d440a5448c5990844c4747445afb3d Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Fri, 29 Dec 2023 08:01:09 +0100 Subject: [PATCH] Add Threads themes --- .../Sources/DesignSystem/ColorSet.swift | 28 ++++++++++++++++++- .../Sources/DesignSystem/Theme.swift | 2 ++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Packages/DesignSystem/Sources/DesignSystem/ColorSet.swift b/Packages/DesignSystem/Sources/DesignSystem/ColorSet.swift index f1613d2c..60dd6042 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/ColorSet.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/ColorSet.swift @@ -6,7 +6,8 @@ public let availableColorsSets: [ColorSetCouple] = .init(light: DesertLight(), dark: DesertDark()), .init(light: NemesisLight(), dark: NemesisDark()), .init(light: MediumLight(), dark: MediumDark()), - .init(light: ConstellationLight(), dark: ConstellationDark())] + .init(light: ConstellationLight(), dark: ConstellationDark()), + .init(light: ThreadsLight(), dark: ThreadsDark())] public protocol ColorSet { var name: ColorSetName { get } @@ -34,6 +35,8 @@ public enum ColorSetName: String { case mediumDark = "Medium - Dark" case constellationLight = "Constellation - Light" case constellationDark = "Constellation - Dark" + case threadsLight = "Threads - Light" + case threadsDark = "Threads - Dark" } public struct ColorSetCouple: Identifiable { @@ -176,3 +179,26 @@ public struct ConstellationLight: ColorSet { public init() {} } + +public struct ThreadsDark: ColorSet { + public var name: ColorSetName = .threadsDark + public var scheme: ColorScheme = .dark + public var tintColor: Color = .init(hex: 0x0095F6) + public var primaryBackgroundColor: Color = .init(hex: 0x101010) + public var secondaryBackgroundColor: Color = .init(hex: 0x181818) + public var labelColor: Color = .init(hex: 0xE2E4E2) + + public init() {} +} + +public struct ThreadsLight: ColorSet { + public var name: ColorSetName = .threadsLight + public var scheme: ColorScheme = .light + public var tintColor: Color = .init(hex: 0x0095F6) + public var primaryBackgroundColor: Color = .init(hex: 0xFFFFFF) + public var secondaryBackgroundColor: Color = .init(hex: 0xFFFFFF) + public var labelColor: Color = .black + + public init() {} +} + diff --git a/Packages/DesignSystem/Sources/DesignSystem/Theme.swift b/Packages/DesignSystem/Sources/DesignSystem/Theme.swift index 8e433792..de72b8e9 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Theme.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Theme.swift @@ -293,6 +293,8 @@ import SwiftUI MediumDark(), ConstellationLight(), ConstellationDark(), + ThreadsLight(), + ThreadsDark() ] }