MATLAB green-yellow-red colormap.
The stoplight colormap is deprecated. For a more versatile, adjustable multiple-color colormap script, check out multigradient instead: https://mathworks.com/matlabcentral/fileexchange/68217-multigradient
The stoplight colormap's green-yellow-red colormap is included in multigradient as the following preset:
Create scripts with code, output, and formatted text in a single executable document.