isHex function

bool isHex(
  1. String input
)

Implementation

bool isHex(String input) {
  bool isHex = input.length == 7 && input.contains("#");
  return isHex;
}