export const isHexColor = (str) => { const pattern = /^#([0-9A-F]{3}){1,2}$/i; return pattern.test(str); }