Energy production from the Sun requires a stable efficient light absorber. Promising candidates in this respect are organometal perovskites (ABX3), which have been intensely investigated during the last years. Here, we have performed electronic structure calculations of 240 perovskites composed of Cs, CH3NH3, and HC(NH2)2 as A-cation, Sn and Pb as B-ion, and a combination of Cl, Br, and I as anions. The calculated gaps span over a region from 0.5 to 5.0 eV. In addition, the trends over bandgaps have been investigated: the bandgap increases with an increase of the electronegativities of the constituent species, while it reduces with an increase of the lattice constants of the system.