import "core-js/modules/es6.string.starts-with";
export function VisualizationColorType(props, propName) {
  var color = props[propName];

  if (color === undefined) {
    return;
  } // TODO upgrade this to check all possible color string formats
  // using libs like colorjs


  if (!(typeof color === 'string' || color instanceof String) || !color.startsWith('#')) {
    return new Error('Color must be a valid hex color string in the form #RRGGBB');
  }
}