Ternary colloidal semiconductors for energy applications