To maximize the light yield of the liquid scintillator (LS) for the Jiangmen Underground Neutrino Observatory (JUNO), a 20 t LS sample was produced in a pilot plant at Daya Bay. The optical properties of the new LS in various compositions were studied by replacing the gadolinium-loaded LS in one antineutrino detector. The concentrations of the fluor, PPO, and the wavelength shifter, bis-MSB, were increased in 12 steps from 0.5 g/L and <0.01 mg/L to 4 g/L and 13 mg/L, respectively. The numbers of total detected photoelectrons suggest that, with the optically purified solvent, the bis-MSB concentration does not need to be more than 4 mg/L. To bridge the one order of magnitude in the detector size difference between Daya Bay and JUNO, the Daya Bay data were used to tune the parameters of a newly developed optical model. Then, the model and tuned parameters were used in the JUNO simulation. This enabled to determine the optimal composition for the JUNO LS: purified solvent LAB with 2.5 g/L PPO, and 1 to 4 mg/L bis-MSB.