Cotton code
57 lines · 2.8 KB · SwiftRaw
// The colours of the money's things, where they are not painted.//// A spend's till receipt, money in's cheque, an account's card and its red// signal clip are painted (`receipt-paper`, `cheque-leaf`,// `statement-card`, `statement-tab` and their shadows, cut by `scripts/import-money-materials.py` from// the layers painted after the pictures chosen for Money, 29-30 Oct 2026).// What is drawn live over the paint takes its colour from here: the till's// and the posting machine's purple-black ribbon; the cheque's dark-blue print// and the blue-black of the hand that fills it; the violet of the bank's// rubber stamp; the account card's green print; the pencil a note is made// in; and where a build carries no pictures, the papers' and the clip's own// colours (they lie on the money's terrazzo, `GroundMaterial`). A material is NOT a palette role: it is// the colour of a thing, read off the reference the way a paper's dye is read// off its photograph (`PaperDye`), and it does not flip with the theme.// `PaletteGuardTests` exempts this file from the CHANNELS sweep for that// sentence and no other; it writes no hex and names nothing.import SwiftUI/// The money's materials.public enum MoneyMaterial: String, CaseIterable, Sendable {    /// The cheque's print: its rules' and its printed words' dark blue.    case print    /// The blue-black fountain-pen ink a cheque is filled in by hand.    case hand    /// The violet of a bank's rubber stamp pad.    case stamp    /// The account card's green print: the bank's name and the balance's head.    case ledgerPrint    /// The purple-black ribbon a till prints and a posting machine types in.    case posting    /// A pencil: the corner and the state noted on an object.    case pencil    /// The receipt's thermal white, where a build carries no pictures.    case receipt    /// The cheque's pale blue-green security paper, where a build carries no pictures.    case cheque    /// The account card's buff, where a build carries no pictures.    case card    /// The signal clip's red, where a build carries no pictures.    case tab    public var colour: Color {        switch self {        case .print: Color(red: 0.12, green: 0.19, blue: 0.33)        case .hand: Color(red: 0.09, green: 0.13, blue: 0.31)        case .stamp: Color(red: 0.36, green: 0.22, blue: 0.52)        case .ledgerPrint: Color(red: 0.17, green: 0.33, blue: 0.23)        case .posting: Color(red: 0.26, green: 0.17, blue: 0.35)        case .pencil: Color(red: 0.40, green: 0.40, blue: 0.42)        case .receipt: Color(red: 0.93, green: 0.91, blue: 0.86)        case .cheque: Color(red: 0.82, green: 0.88, blue: 0.85)        case .card: Color(red: 0.90, green: 0.78, blue: 0.60)        case .tab: Color(red: 0.66, green: 0.13, blue: 0.10)        }    }}