Ternary diagrams of the phase, optical bandgap energy and photoluminescence of mixed-halide perovskites