Spaces:
Running
Running
File size: 2,487 Bytes
0daf81d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | export interface CardStyle {
id: string
name: string
card: 'glass' | 'solid'
fill: string // glass: tint drawn over the blurred photo; solid: card colour
ink: string
sub: string
rim: string | null
shadow: number
radius: number
rotate: number // degrees
pillQ: { bg: string; fg: string }
pillA: { bg: string; fg: string }
marker: string
tag: { bg: string; fg: string }
swatch: string // UI preview
}
export const STYLES: CardStyle[] = [
{
id: 'glass', name: '磨砂白', card: 'glass', fill: 'rgba(255,255,255,0.70)', ink: '#16161c', sub: '#282834',
rim: 'rgba(255,255,255,0.8)', shadow: 0.43, radius: 46, rotate: 0,
pillQ: { bg: '#ffd63d', fg: '#16161c' }, pillA: { bg: '#22c55e', fg: '#ffffff' },
marker: 'rgba(255,214,61,0.85)', tag: { bg: 'rgba(22,22,28,0.9)', fg: '#ffffff' }, swatch: 'linear-gradient(135deg,#f5f5f7,#d9dbe3)',
},
{
id: 'night', name: '暗夜玻璃', card: 'glass', fill: 'rgba(14,14,20,0.62)', ink: '#ffffff', sub: '#e8e8f0',
rim: 'rgba(255,255,255,0.22)', shadow: 0.5, radius: 46, rotate: 0,
pillQ: { bg: 'rgba(255,255,255,0.16)', fg: '#ffffff' }, pillA: { bg: '#22c55e', fg: '#ffffff' },
marker: 'rgba(255,59,92,0.55)', tag: { bg: '#ffffff', fg: '#16161c' }, swatch: 'linear-gradient(135deg,#2a2a35,#0e0e14)',
},
{
id: 'sticky', name: '便利贴', card: 'solid', fill: '#ffe680', ink: '#2a2418', sub: '#3a3222',
rim: null, shadow: 0.35, radius: 16, rotate: -2,
pillQ: { bg: '#2a2418', fg: '#ffe680' }, pillA: { bg: '#2a2418', fg: '#ffe680' },
marker: 'rgba(255,120,120,0.55)', tag: { bg: '#2a2418', fg: '#ffe680' }, swatch: 'linear-gradient(135deg,#fff1a8,#ffd84d)',
},
{
id: 'paper', name: '纯白卡片', card: 'solid', fill: '#ffffff', ink: '#111114', sub: '#2a2a33',
rim: null, shadow: 0.3, radius: 36, rotate: 0,
pillQ: { bg: '#111114', fg: '#ffffff' }, pillA: { bg: '#22c55e', fg: '#ffffff' },
marker: 'rgba(255,214,61,0.9)', tag: { bg: '#111114', fg: '#ffffff' }, swatch: '#ffffff',
},
{
id: 'mono', name: '极简黑', card: 'solid', fill: 'rgba(14,14,18,0.94)', ink: '#ffffff', sub: '#dcdce4',
rim: 'rgba(255,255,255,0.12)', shadow: 0.45, radius: 28, rotate: 0,
pillQ: { bg: '#ffffff', fg: '#111114' }, pillA: { bg: '#ffffff', fg: '#111114' },
marker: 'rgba(255,59,92,0.6)', tag: { bg: '#ffffff', fg: '#111114' }, swatch: '#111114',
},
]
export const getStyle = (id: string) => STYLES.find((s) => s.id === id) ?? STYLES[0]
|