CHResume/ResumeBuilder/Color+Extension.swift
Christoph Hagen bd87a4fb6f First version
2023-08-18 22:47:24 +02:00

17 lines
366 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)
}
}