# Pgfplots: colormap sharp transition

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]
\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.

As noted in a comment under the referenced answer it's wrong to specify the same point twice, this is now apparently detected in the updated tex package and produces an error in tex rather than leave it to (some) pdf viewers to detect. if I change the second 500pt to the next position, 505pt it runs without error.

\documentclass{article}
\usepackage{pgfplots}
\begin{document}

\pgfplotsset{
colormap={blackwhite}{[5pt]
rgb255(0pt)=(255, 200, 0);
rgb255(500pt)=(255, 75, 0);
rgb255(505pt)=(0, 100, 255);
rgb255(1000pt)=(0, 255, 255)
},
}

\begin{tikzpicture}
\begin{axis}[colorbar]