//
// Copyright 2026 Element Creations Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
// Please see LICENSE files in the repository root for full details.
//

import SwiftUI
import UIKit

public extension Color {
    static let letroPrimary = Color(hex: 0xF32D1B)
    static let letroSecondary = Color(hex: 0xF9BC15)
    static let letroGray = Color(hex: 0xB1B3B9)
    static let letroGradient1 = Color(hex: 0xCB2000)
    static let letroGradient2 = Color(hex: 0xD33900)
    static let letroGradient3 = Color(hex: 0xDD5A00)
    static let letroGradient4 = Color(hex: 0xE98200)
    static let letroGradient5 = Color(hex: 0xF7B000)
    
    
    init(hex: UInt32) {
        self.init(.sRGB, red: Double((hex >> 16) & 0xFF) / 255.0, green: Double((hex >> 8) & 0xFF) / 255.0, blue: Double(hex & 0xFF) / 255.0, opacity: 1)
    }
}

public extension UIColor {
    static let letroPrimary = UIColor(hex: 0xF32D1B)
    static let letroSecondary = UIColor(hex: 0xF9BC15)
    static let letroGray = UIColor(hex: 0xB1B3B9)
    static let letroGradient1 = UIColor(hex: 0xCB2000)
    static let letroGradient2 = UIColor(hex: 0xD33900)
    static let letroGradient3 = UIColor(hex: 0xDD5A00)
    static let letroGradient4 = UIColor(hex: 0xE98200)
    static let letroGradient5 = UIColor(hex: 0xF7B000)
    
    convenience init(hex: UInt32) {
        self.init(red: CGFloat((hex >> 16) & 0xFF) / 255.0, green: CGFloat((hex >> 8) & 0xFF) / 255.0, blue: CGFloat(hex & 0xFF) / 255.0, alpha: 1)
    }
}
