First version
This commit is contained in:
15
CHDataManagement/Extensions/Color+RGB.swift
Normal file
15
CHDataManagement/Extensions/Color+RGB.swift
Normal file
@ -0,0 +1,15 @@
|
||||
import SwiftUI
|
||||
|
||||
extension Color {
|
||||
|
||||
init(_ r: Int, _ g: Int, _ b: Int) {
|
||||
self.init(r: r, g: g, b: b)
|
||||
}
|
||||
|
||||
init(r: Int, g: Int, b: Int) {
|
||||
self.init(
|
||||
red: Double(r) / 255,
|
||||
green: Double(g) / 255,
|
||||
blue: Double(b) / 255)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user