Since this seems doesn't work anymore, there's a way to make a sharp transition in a pgfplots colormap gradient color?
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\pgfplotsset{
colormap={blackwhite}{[5pt]
rgb255(0pt)=(255, 200, 0);
rgb255(500pt)=(255, 75, 0);
rgb255(500pt)=(0, 100, 255);
rgb255(1000pt)=(0, 255, 255)
},
}
\begin{tikzpicture}
\begin{axis}[colorbar]
\addplot [scatter, samples=50] {x};
\end{axis}
\end{tikzpicture}
\end{document}
TeXworks error message:
! Package pgfplots Error: Colormaps must have increasing positions. The provide d colormap has mesh width '0.0' at rgb255(500pt)=(0, 100, 255) (color no 101) . Please assign increasing positions.