const STICKY_NOTE_COLORS = {
    blue: '#42A1FF',
    green: '#6EB84A',
    yellow: '#FFB40E',
    pink: '#ED145B',
    white: 'var(--canvas-border)'
};
const STICKY_NOTE_BG_ALPHA = 0.08;
function withAlpha(hex, alpha = STICKY_NOTE_BG_ALPHA) {
    const clampedAlpha = Math.max(0, Math.min(1, alpha));
    if (hex.startsWith('var(')) return `color-mix(in srgb, ${hex} ${Math.round(100 * clampedAlpha)}%, transparent)`;
    let normalized = hex.startsWith('#') ? hex : `#${hex}`;
    if (/^#([a-fA-F0-9]{3})$/.test(normalized)) normalized = `#${normalized.slice(1).split('').map((c)=>c + c).join('')}`;
    const r = parseInt(normalized.slice(1, 3), 16);
    const g = parseInt(normalized.slice(3, 5), 16);
    const b = parseInt(normalized.slice(5, 7), 16);
    return `rgba(${r}, ${g}, ${b}, ${clampedAlpha})`;
}
export { STICKY_NOTE_COLORS, withAlpha };
