I have three RGB values,i want to know color of this RGB values,how can i do this

6 views (last 30 days)
Currently i am not able to make this code sorry.......But i just want to know the color of RGB values
My valyes are..
R = 239;
G = 189;
B = 87;
I want to know the Color of this RGB values please anyone can help me ...
My RGB values are continusly changed depend upon that color Image..
  2 Comments

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 30 Nov 2022
You could make up an image with only those color values and show it
rows = 30;
columns = 40;
R = 239 * ones(rows, columns, 'uint8');
G = 189 * ones(rows, columns, 'uint8');
B = 87 * ones(rows, columns, 'uint8');
rgbImage = cat(3, R, G, B);
imshow(rgbImage);
  5 Comments

Sign in to comment.

More Answers (1)

DGM
DGM on 1 Dec 2022
I have no idea what's going on here either, but I can guess.
If you want a color name, then you can use Stephen's colornames() tool. Of course, if you want a named color, you'll have to specify the context within which it's defined (i.e. the palette).
R = 239;
G = 189;
B = 87;
mytuple = [R G B]/255 % unit-scale double
palettes = colornames(); % a list of all available palettes
matchname = cell(numel(palettes),1);
for p = 1:numel(palettes)
matchname(p) = colornames(palettes{p},mytuple);
end
[palettes matchname] % the closest match within each palette
ans =
30×2 cell array
{'Alphabet' } {'Orpiment' }
{'AmstradCPC' } {'15 Orange' }
{'AppleII' } {'13 Yellow' }
{'Bang' } {'79 Light Brilliant Gamboge'}
{'BS381C' } {'353 Deep Cream' }
{'CGA' } {'14 Yellow' }
{'Crayola' } {'Mango' }
{'CSS' } {'Goldenrod' }
{'dvips' } {'Dandelion' }
{'Foster' } {'Butterscotch' }
{'HTML4' } {'Yellow' }
{'ISCC' } {'67 Brilliant Orange Yellow'}
{'Kelly' } {'3 Yellow' }
{'MacBeth' } {'12 Orange Yellow' }
{'MATLAB' } {'Yellow' }
{'Natural' } {'Yellow' }
{'R' } {'Goldenrod2' }
{'RAL' } {'1012 Lemon Yellow' }
{'Resene' } {'Ronchi' }
{'Resistor' } {'-1 Gold' }
{'SherwinWilliams'} {'6676 Butterfield' }
{'SVG' } {'Goldenrod' }
{'Tableau' } {'9 Olive' }
{'Thesaurus' } {'Yellow: Mustard' }
{'Trubetskoy' } {'3 Yellow' }
{'Wikipedia' } {'Maximum Yellow Red' }
{'Wolfram' } {'Orange' }
{'X11' } {'Goldenrod2' }
{'xcolor' } {'Brown' }
{'xkcd' } {'Macaroni And Cheese' }
Then again, you've asked both for the color of RGB values, and for RGB values of a color image. So I can't even know which is the known and which is the unknown.

Community Treasure Hunt

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

Start Hunting!