Grayscale to RGB Converter

Convert grayscale images to RGB using a specified colormap.

You are now following this Submission

The function converts grayscale images to RGB using a specified colormap. The default colormap is ``hot''. The graysale image is supplied either as a name or a matrix.

Example:

res = grs2rgb(im,cmap);

res is a size(im)-by-3 RGB image.

Cite As

Valeriy Korostyshevskiy (2026). Grayscale to RGB Converter (https://www.mathworks.com/matlabcentral/fileexchange/13312-grayscale-to-rgb-converter), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: Gray image to Color image conversion

Inspired: rgb2hex and hex2rgb

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

Added html file