Colormapping is an effective and popular visual representation to analyze data patterns for 2D scalar fields. Scientists usually adopt a default colormap and adjust it to fit data in a trial-and-error process. Even though a few colormap design rules and measures are proposed, there is no automatic algorithm to directly optimize a default colormap for better revealing spatial patterns hidden in unevenly distributed data, especially the boundary characteristics. To fill this gap, we conduct a pilot study with six domain experts and summarize three requirements for automated colormap adjustment. We formulate the colormap adjustment as a nonlinear constrained optimization problem, and develop an efficient GPU-based implementation accompanying with a few interactions. We demonstrate the usefulness of our method with two case studies.