mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-06-05 13:28:50 +00:00
Provide a default light theme close #3
This commit is contained in:
parent
d9481cc802
commit
d1ad54248c
5 changed files with 107 additions and 4 deletions
|
@ -2,15 +2,15 @@ import SwiftUI
|
||||||
|
|
||||||
extension Color {
|
extension Color {
|
||||||
public static var brand: 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 {
|
public static var primaryBackground: Color {
|
||||||
Color(red: 16/255, green: 21/255, blue: 35/255)
|
Color("primaryBackground", bundle: .module)
|
||||||
}
|
}
|
||||||
|
|
||||||
public static var secondaryBackground: Color {
|
public static var secondaryBackground: Color {
|
||||||
Color(red: 30/255, green: 35/255, blue: 62/255)
|
Color("secondaryBackground", bundle: .module)
|
||||||
}
|
}
|
||||||
|
|
||||||
public static var label: Color {
|
public static var label: Color {
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,7 +9,6 @@ public class Theme: ObservableObject {
|
||||||
@AppStorage(ThemeKey.tint.rawValue) public var tintColor: Color = .brand
|
@AppStorage(ThemeKey.tint.rawValue) public var tintColor: Color = .brand
|
||||||
@AppStorage(ThemeKey.primaryBackground.rawValue) public var primaryBackgroundColor: Color = .primaryBackground
|
@AppStorage(ThemeKey.primaryBackground.rawValue) public var primaryBackgroundColor: Color = .primaryBackground
|
||||||
@AppStorage(ThemeKey.secondaryBackground.rawValue) public var secondaryBackgroundColor: Color = .secondaryBackground
|
@AppStorage(ThemeKey.secondaryBackground.rawValue) public var secondaryBackgroundColor: Color = .secondaryBackground
|
||||||
@AppStorage(ThemeKey.label.rawValue) public var labelColor: Color = .label
|
|
||||||
|
|
||||||
public init() { }
|
public init() { }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue