Provide a default light theme close #3

This commit is contained in:
Thomas Ricouard 2022-12-30 21:00:20 +01:00
parent d9481cc802
commit d1ad54248c
5 changed files with 107 additions and 4 deletions

View File

@ -2,15 +2,15 @@ import SwiftUI
extension Color {
public static var brand: Color {
Color(red: 187/255, green: 59/255, blue: 226/255)
Color("brand", bundle: .module)
}
public static var primaryBackground: Color {
Color(red: 16/255, green: 21/255, blue: 35/255)
Color("primaryBackground", bundle: .module)
}
public static var secondaryBackground: Color {
Color(red: 30/255, green: 35/255, blue: 62/255)
Color("secondaryBackground", bundle: .module)
}
public static var label: Color {

View File

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.886",
"green" : "0.224",
"red" : "0.733"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.886",
"green" : "0.224",
"red" : "0.733"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,33 @@
{
"colors" : [
{
"color" : {
"platform" : "ios",
"reference" : "systemBackgroundColor"
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.137",
"green" : "0.082",
"red" : "0.063"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,33 @@
{
"colors" : [
{
"color" : {
"platform" : "ios",
"reference" : "secondarySystemBackgroundColor"
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.243",
"green" : "0.137",
"red" : "0.118"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -9,7 +9,6 @@ public class Theme: ObservableObject {
@AppStorage(ThemeKey.tint.rawValue) public var tintColor: Color = .brand
@AppStorage(ThemeKey.primaryBackground.rawValue) public var primaryBackgroundColor: Color = .primaryBackground
@AppStorage(ThemeKey.secondaryBackground.rawValue) public var secondaryBackgroundColor: Color = .secondaryBackground
@AppStorage(ThemeKey.label.rawValue) public var labelColor: Color = .label
public init() { }
}