By a strategy featuring perfluoroalkylation of the highly soluble intermediates and their further efficient transformations to target compounds, a versatile synthesis of core-perfluoroalkylated perylene diimides (PDIs) and naphthalene diimides (NDIs) was developed, and PDIs perfluoroalkylated at 1-position or 1,6-positions and core-perfluoroalkylated NDIs were first obtained. By esterification, perfluoroalkylation, hydrolysis, and condensation with amine, 1-perfluorooctyl-PDIs (7b, 7c, and 7e), 1,7-bis(perfluorooctyl)-PDIs (8a-c and 8e-g), 1,6-bis(perfluorooctyl)-PDIs (8'e), a mixture of 1,7-bis(trifluoromethyl)-PDIs and 1,6-bis(trifluoromethyl)-PDIs (11b and 11'b, 11d and 11'd, in a ratio of 19:1), 2-perfluorooctyl-NDIs (20a-d), and 2,6-bis(perfluorooctyl)-NDIs (21a-21d) were efficiently synthesized. Five valuable intermediates--1-perfluorooctylperylene dianhydride (5), 1,7-bis(perfluorooctyl)perylene dianhydride (6) 1,6-bis(perfluorooctyl)perylene dianhydride (6'), 2-perfluorooctylnaphthalene dianhydride (18), and 2,6-bis(perfluorooctyl) naphthalene dianhydride (19)--were also obtained, and they can condense with many amines to produce PDIs containing different functional side chains on the imide nitrogen atoms. Solubility, electrochemistry, and optical properties of the above core-perfluoroalkylated PDIs and NDIs were investigated. Core-perfluoroalkylated 8e, 8f, 8'e, mixture of 11d and 11'd, 20b, and 20d with excellent solubility in common organic solvents are competitive as candidates as solution processable semiconductors. Core-perfluoroalkylated PDIs and NDIs with experimental LUMO energy of 4.04-4.34 eV demonstrate strong electron accepting ability. For core-perfluoroalkylated PDIs, the maximum absorptions display blue shifts of 6-18 nm and the maximum molar extinction coefficients decrease obviously relative to those of unsubstituted PDIs, and they inherit the strong fluorescence from the PDIs family, which makes them promising fluorescent dyes.