Although it usually involves troublesome and time-consuming synthesis work, molecular structure tailoring has been the mainstream tool to adjust the optical absorption and bandgap of organic semiconductors. Herein, we provided a convenient and feasible method to prepare narrow bandgap small-molecule semiconductors by Lewis acid-base chemistry and the optical absorption was adjusted by the stoichiometry of Lewis acid-base reactions. In this work, three pyridine capped diketopyrrolopyrrole (DPP) molecules, i.e., DPPPy-Ph-F, DPPPy-Ph-3F, and DPPPy-Py-F, with medium bandgap were synthesized to coordinate with Lewis acid of B(C6F5)3 (BCF). By coordinating with BCF, as demonstrated by 1H, 19F, and 11B NMR spectra, the bandgaps of these DPP molecules were depressed largely. For DPPPy-Ph-F, with two pyridine units flanking symmetrically, 2 eq of BCF converted the two pyridine nitrogens stoichiometrically to Lewis acid adducts, along with absorption bands red-shifted and bandgap depressed (1.89 vs. 1.80 eV). For DPPPy-Ph-3F, with two pyridine units flanked and trifluorobenzene capped, adding 2 eq of BCF was unable to convert the two pyridine nitrogens to BCF adducts completely, due to the strong electron-drawing ability of trifluorobenzene substituent on pyridine, reducing its basicity. After adding excess BCF to coordinate with nitrogens, the bandgaps of DPPPy-Ph-3F also decreased from 1.92 eV to 1.84 eV. For DPPPy-Py-F, with four pyridine units flanked, 4 eq of BCF were required to bind the pyridine nitrogens. Accordingly, the red-shift of absorption bands and the depression of optical bandgaps (1.96 vs. 1.75 eV) for DPPPy-Py-F were most striking among the three molecules.