export const toUppercaseHexColor = (
  color: string | undefined
): string | undefined => {
  if (!color) return undefined;

  // Check if it's a valid hex color
  const hexRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
  if (!hexRegex.test(color)) return color;

  return color.toUpperCase();
};
