In this paper, we propose a unified framework for unimodular sequence design with different uses. We achieve the task by minimizing the residual error between the designed power spectrum density (PSD) and the target one. This unified metric includes the objective functions of PSD fitting, spectral mask reduction, improving signal-to-interference-plus-noise ratio (SINR), minimizing integrated sidelobe level (ISL), complementary set of sequences (CSS) design, and orthogonal set of sequences (OSS) design as special cases. We solve the PSD residual error minimization using conjugate gradient (CG) method, which enjoys reliable local convergence and good convergence rate. We derive a way to employ fast Fourier transform (FFT) in calculating the gradient with respect to the sequence's phase, so that the CG method can be implemented efficiently. Due to the inherent nature of gradient method, the proposed method is very flexible and it can tackle the designs with composite objectives, which are more challenging and often intractable for the existing methods. Comparisons with the state-of-the-art methods indicate that the proposed method can achieve better or equally good results with much reduced execution time.