Hydrophobic interactions play essential roles in a broad range of biological functions such as protein folding, lipid bilayer formation, and cell signaling. Analyses of model hydrophobic colloids and uniform surfaces have led to significant advances in understanding hydrophobic interactions. However, unlike these model systems, biological macromolecules typically contain hydrophobic domains surrounded by a heterogeneous distribution of charged and polar residues. Molecular dynamic simulations predict that heterogeneity can profoundly influence the strength of hydrophobic interactions, but few experiments directly analyze this effect in a biological context. To probe how neighboring amino acids can modulate hydrophobic interactions, we engineered peptides containing hydrophobic phenylalanine-glycine (FG) domains based on nuclear pore complex (NPC) proteins. These domains are known to form a self-assembled meshwork that selectively filters molecules in the nuclear pore of eukaryotic cells. Here we show that single amino acid substitutions adjacent to hydrophobic domains can tune the self-assembly of peptides from non-cohesive solutions and colloidal precipitates to hydrogels with a stiffness of 104 Pa. Once assembled into hydrogels, FG domains selectively interact with hydrophobic particles in solution based on single amino acid substitutions in nearby “modulator” domains. Our work shows that hydrophobic domains cannot be considered as discrete entities on protein surfaces or sequences; the surrounding sequence space modulates hydrophobic interactions in a non-additive manner to tune both structure and function of the molecule.