function colors(flag) {
  let colorMarker = "";
  switch (flag) {
    case 0:
      colorMarker = "pink";
      break;
    case 1:
      colorMarker = "red";
      break;
    case 2:
      colorMarker = "blue";
      break;
    case 3:
      colorMarker = "green";
      break;
    default:
      break;
  }

  return L.AwesomeMarkers.icon({
    markerColor: colorMarker,
  });
}
https://github.com/lvoogdt/Leaflet.awesome-markers