Add Neon (OLED) Dark and Light themes

This commit is contained in:
Thomas Ricouard 2023-01-21 18:40:35 +01:00
parent 799b7943bc
commit a0ad701f52
2 changed files with 27 additions and 0 deletions

View file

@ -2,6 +2,7 @@ import SwiftUI
public let availableColorsSets: [ColorSetCouple] = public let availableColorsSets: [ColorSetCouple] =
[.init(light: IceCubeLight(), dark: IceCubeDark()), [.init(light: IceCubeLight(), dark: IceCubeDark()),
.init(light: IceCubeNeonLight(), dark: IceCubeNeonDark()),
.init(light: DesertLight(), dark: DesertDark()), .init(light: DesertLight(), dark: DesertDark()),
.init(light: NemesisLight(), dark: NemesisDark()), .init(light: NemesisLight(), dark: NemesisDark()),
.init(light: MediumLight(), dark: MediumDark())] .init(light: MediumLight(), dark: MediumDark())]
@ -22,6 +23,8 @@ public enum ColorScheme: String {
public enum ColorSetName: String { public enum ColorSetName: String {
case iceCubeDark = "Ice Cube - Dark" case iceCubeDark = "Ice Cube - Dark"
case iceCubeLight = "Ice Cube - Light" case iceCubeLight = "Ice Cube - Light"
case iceCubeNeonDark = "Ice Cube Neon - Dark"
case iceCubeNeonLight = "Ice Cube Neon - Light"
case desertDark = "Desert - Dark" case desertDark = "Desert - Dark"
case desertLight = "Desert - Light" case desertLight = "Desert - Light"
case nemesisDark = "Nemesis - Dark" case nemesisDark = "Nemesis - Dark"
@ -61,6 +64,28 @@ public struct IceCubeLight: ColorSet {
public init() {} public init() {}
} }
public struct IceCubeNeonDark: ColorSet {
public var name: ColorSetName = .iceCubeNeonDark
public var scheme: ColorScheme = .dark
public var tintColor: Color = .init(red: 213 / 255, green: 46 / 255, blue: 245 / 255)
public var primaryBackgroundColor: Color = .black
public var secondaryBackgroundColor: Color = .init(red: 0 / 255, green: 0 / 255, blue: 21 / 255)
public var labelColor: Color = .white
public init() {}
}
public struct IceCubeNeonLight: ColorSet {
public var name: ColorSetName = .iceCubeNeonLight
public var scheme: ColorScheme = .light
public var tintColor: Color = .init(red: 213 / 255, green: 46 / 255, blue: 245 / 255)
public var primaryBackgroundColor: Color = .white
public var secondaryBackgroundColor: Color = .init(hex: 0xF0F1F2)
public var labelColor: Color = .black
public init() {}
}
public struct DesertDark: ColorSet { public struct DesertDark: ColorSet {
public var name: ColorSetName = .desertDark public var name: ColorSetName = .desertDark
public var scheme: ColorScheme = .dark public var scheme: ColorScheme = .dark

View file

@ -119,6 +119,8 @@ public class Theme: ObservableObject {
[ [
IceCubeDark(), IceCubeDark(),
IceCubeLight(), IceCubeLight(),
IceCubeNeonDark(),
IceCubeNeonLight(),
DesertDark(), DesertDark(),
DesertLight(), DesertLight(),
NemesisDark(), NemesisDark(),