We study the scalar and Yukawa sectors of three Higgs doublets models with a generalized CP symmetry. Imposing the symmetry on the quadratic and quartic couplings of the scalar potential, we show that there are only four classes of scalar potentials, merely one more than in two-Higgs-doublet models (2HDM). Two 3HDM cases are analogs of two 2HDM cases, while the other 2HDM case splits here into two distinct potentials. In 2HDM with generalized CP symmetries extended to the Yukawa sector, there are only two possible cases: the usual CP, with 18 real Yukawa couplings; and a minimal generalized CP model, with 12 real Yukawa parameters. In contrast, with three Higgs there is a rich variety of allowed models. We classify all possible Yukawa textures, showing that there are 40 possibilities, several of which have only 10 real Yukawa couplings. Published by the American Physical Society 2024