SPB Git forge
2commits 1branches 0releases
180.0 KBsize
maindefault branch
1 mo agolast push
Swift 100%
1.1 KB · 35 lines swift
Raw Blame History
1import SwiftUI23enum Ka {4    static let bg = Color(hex: 0xF2F1EC)5    static let card = Color(hex: 0xFCFBF8)6    static let ink = Color(hex: 0x1A1611)7    static let orange = Color(hex: 0xF97316)8    static let muted = Color(hex: 0x6D675C)9    static let url = URL(string: "https://www.administration-ka.com")!10}1112extension Color {13    init(hex: UInt, alpha: Double = 1) {14        self.init(.sRGB,15                  red: Double((hex >> 16) & 0xff) / 255,16                  green: Double((hex >> 8) & 0xff) / 255,17                  blue: Double(hex & 0xff) / 255,18                  opacity: alpha)19    }20}2122struct KaMark: View {23    var size: CGFloat = 8424    var body: some View {25        RoundedRectangle(cornerRadius: size * 0.28, style: .continuous)26            .fill(Ka.orange)27            .overlay(RoundedRectangle(cornerRadius: size * 0.28, style: .continuous)28                .strokeBorder(Ka.ink, lineWidth: max(2, size * 0.035)))29            .overlay(Text("Ka")30                .font(.system(size: size * 0.42, weight: .heavy, design: .rounded))31                .foregroundColor(Ka.ink))32            .frame(width: size, height: size)33    }34}35