function u(r) {
  const t = (r || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  return t && t[1] && t[2] && t[3] ? !(t[1] === t[2] && t[2] === t[3]) : !0;
}
function e(r) {
  return r && r !== "#fff" && r !== "#ffffff" && r !== "rgb(255, 255, 255)" && r !== "rgba(255, 255, 255, 1)" && u(r) && !/rgba\((?:\d*, ){3}0\)/.test(r) && // any transparent rgba color
  r !== "transparent";
}
function a(r) {
  const {
    borderTopColor: t,
    borderColor: n,
    backgroundColor: f
  } = getComputedStyle(r);
  return e(t) ? t : e(n) ? n : e(f) ? f : null;
}
export {
  a as getTargetWaveColor,
  u as isNotGrey,
  e as isValidWaveColor
};
