End-Of-Session: Added config/data storage with default phrases
This commit is contained in:
22
Color.swift
Normal file
22
Color.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Color.swift
|
||||
// AllenWrench
|
||||
//
|
||||
// Created by Elizabeth Cray on 1/11/25.
|
||||
// Copyright © 2025 Cray. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
extension Color {
|
||||
init(hex: UInt, alpha: Double = 1) {
|
||||
self.init(
|
||||
.sRGB,
|
||||
red: Double((hex >> 16) & 0xff) / 255,
|
||||
green: Double((hex >> 08) & 0xff) / 255,
|
||||
blue: Double((hex >> 00) & 0xff) / 255,
|
||||
opacity: alpha
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user