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

조회 수: 6(최근 30일)
Shri.s 2022년 11월 30일
댓글: Image Analyst 2022년 12월 1일
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표시숨기기 이전 댓글 수: 1
Shri.s 2022년 11월 30일
Sir can you give me solution of how to find the RGB values of color image please

댓글을 달려면 로그인하십시오.

### 채택된 답변

Image Analyst 2022년 11월 30일
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);

댓글을 달려면 로그인하십시오.

### 추가 답변(1개)

DGM 2022년 12월 1일
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' }
{'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.

댓글을 달려면 로그인하십시오.

### 범주

Find more on Color in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by