Small band gaps simplify the use of polymers as semiconductors. Dye molecules can be used to construct semiconducting polymers with small band gaps. We use ab initio calculations to systematically design and study polymers derived from squaraine dyes. The calculated band gaps range from 2.3 eV to as low as 0.2 eV. Simple arguments based upon a Huckel analysis of the ab initio results enable us to identify the factors that control the size of the band gap. Squaraine polymers synthesized up till now fall into a class in which the band gap (≥1.3 eV) essentially reflects the HOMO/LUMO energy difference of the squaraine monomer fragment. We predict that a second class of polymer topology leads to much smaller band gaps. The reason for this is that band formation in the polymer shifts the energy of the highest occupied state of the polymer up with respect to the HOMO of the squaraine monomer, whereas the energy of the lowest unoccupied state of the polymer is fixed at the level of the monomer LUMO because of sy...