export function normalizeColorForApi(color: string): string {
  return color.replace(/^#/, '');
}

export function getProductColorCss(color?: string): string {
  if (!color) return '#cccccc';
  return color.startsWith('#') ? color : `#${color}`;
}

export function toPickerHex(color?: string): string {
  if (!color) return '#000000';
  return color.startsWith('#') ? color : `#${color}`;
}
