CHResume/ResumeBuilder/Color+Extension.swift
2023-09-19 14:50:20 +02:00

33 lines
750 B
Swift

import SwiftUI
extension Color {
init(_ r: Int, _ g: Int, _ b: Int) {
self.init(Double(r) / 255, Double(g) / 255, Double(b) / 255)
}
init(r: Int, g: Int, b: Int) {
self.init(Double(r) / 255, Double(g) / 255, Double(b) / 255)
}
init(_ r: Double, _ g: Double, _ b: Double) {
self.init(red: r, green: g, blue: b)
}
static var lightSchemePrimaryColor: Color {
.init(r: 1, g: 1, b: 1)
}
static var darkSchemePrimaryColor: Color {
.init(r: 224, g: 224, b: 224)
}
static var lightSchemeSecondaryColor: Color {
.init(r: 128, g: 128, b: 128)
}
static var darkSchemeSecondaryColor: Color {
.init(r: 161, g: 161, b: 161)
}
}