File Exchange

image thumbnail

Gray image to Color image conversion

version (61.9 KB) by Jeny Rajan
Converts a gray image to color image


Updated 22 Apr 2016

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This program converts a gray image to color image. The conversion is based on color image submitted along with the input gray image. Actualy it transfers color to a grayscale image. The implementation id based on the paper "Transferring Color to greyscalale Images" by Tomihisa Welsh et. al.

Cite As

Jeny Rajan (2021). Gray image to Color image conversion (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (46)

Ananda Kumar Soshee

Nuruzzaman Faruqui

Zahraa Mohammed


Dhio Alfafian

Ume Kalsoom

very good. Thank you

mohamed jad

thank you it is very useful

B.k Sumedha

Well that was a gud demo.But cant it done without using an reference image.

B.k Sumedha

B.k Sumedha

B.k Sumedha


perfect supereb

james zhan


ravin the cat


Lin Jason

It's powful,thank a lot


the command window says specify the name or matrix of the image. i did as asked. specified the gray scale image(image_name.fig). but it shows error. any suggestions.
thank you

narendra dewangan



Thanks, was very helpful.

How does one convert a binary image to a grayscale image?

Vikesh Katkar

i want code for edge preserving image denoising

mostafa saeed

shanxi taiyuan

very good

aravindan samarasam

kathir avan


r c


i want full project using matlab

vedha pounraj

i want full project using matlab

subha shini

sent full information about grey to colour image conversion for project use.

sobia sobia

i want to color image code in matlab

Abhilekh Gupta

its wonderful save my lot of time in converting gray images to color.

someone somewhere

Alex Chirokov

It is amazing, works like magic.

Hae Min

Fantastic!!!!! You just saved me $$$$$$$ from purchasing a bunch of jargon-written books with no useful information!!!!

tolga kök

You are perfect..!

Punit Master

try to write the function which do not require coloured image for the transformation from grayscale to colour image

mehmed Aliwa

thank good

Kevin Deffrunger

Thank you very much.

John Michael

God bless you

Maria Bledee


ayse kaya

Ionut Alex

Hi! I'm trying to use the "Colorization using Optimization" algorithm (you can find it here on animated gifs. They gave some exemples on their site. The method worked for still images, but I don't know how to use it for animated gifs. Can someone help me please? It is rather important for me. Thank you in advance. My e-mail is

Kevin Dsouza

Thanks a Lot...God bless U

ragad ragad

Roopak Sudhakar

Good work! Can be useful for converting old B/W photos & films to color.

Vladimir Melnik

Please submit files in .m or .zip format.
It is extra work to open in Windows environment.

Sreejith A

Good work done by you.

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!