This paper introduces a novel physical-inspired metaheuristic algorithm called “Light Spectrum Optimizer (LSO)” for continuous optimization problems. The inspiration for the proposed algorithm is the light dispersions with different angles while passing through rain droplets, causing the meteorological phenomenon of the colorful rainbow spectrum. In order to validate the proposed algorithm, three different experiments are conducted. First, LSO is tested on solving CEC 2005, and the obtained results are compared with a wide range of well-regarded metaheuristics. In the second experiment, LSO is used for solving four CEC competitions in single objective optimization benchmarks (CEC2014, CEC2017, CEC2020, and CEC2022), and its results are compared with eleven well-established and recently-published optimizers, named grey wolf optimizer (GWO), whale optimization algorithm (WOA), and salp swarm algorithm (SSA), evolutionary algorithms like differential evolution (DE), and recently-published optimizers including gradient-based optimizer (GBO), artificial gorilla troops optimizer (GTO), Runge–Kutta method (RUN) beyond the metaphor, African vultures optimization algorithm (AVOA), equilibrium optimizer (EO), grey wolf optimizer (GWO), Reptile Search Algorithm (RSA), and slime mold algorithm (SMA). In addition, several engineering design problems are solved, and the results are compared with many algorithms from the literature. The experimental results with the statistical analysis demonstrate the merits and highly superior performance of the proposed LSO algorithm.