I have three RGB values,i want to know color of this RGB values,how can i do this
3 ビュー (過去 30 日間)
表示 古いコメント
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..
採用された回答
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);
5 件のコメント
Image Analyst
2022 年 12 月 1 日
@Shri.s see official documents:
and this one is really cool. They did a study of how different countries call the different colors:
And just for fun:
https://labs.tineye.com/multicolr/ TinEye Labs - Multicolr Search Lab
その他の回答 (1 件)
DGM
2022 年 12 月 1 日
編集済み: DGM
2023 年 3 月 16 日
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);
swatchchart = zeros(numel(palettes),2,3);
for p = 1:numel(palettes)
[matchname(p) matchtuple] = colornames(palettes{p},mytuple);
swatchchart(p,1,:) = mytuple;
swatchchart(p,2,:) = matchtuple;
end
% the closest match within each palette
[palettes matchname]
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' }
% compare the matches (left) to the original color (right)
imshow(swatchchart)

If you want to refine the results, you can.
% calculate the color distance between each
DE = imcolordiff(swatchchart(:,1,:),swatchchart(:,2,:));
% get rid of anything that has an excessive distance
goodmatches = DE<6; % pick some distance
palettes = palettes(goodmatches);
matchname = matchname(goodmatches);
swatchchart = swatchchart(repmat(goodmatches,[1 2 3]));
swatchchart = reshape(swatchchart,[],2,3);
% the closest match within each palette
[palettes matchname]
ans =
11×2 cell array
{'Bang' } {'79 Light Brilliant Gamboge'}
{'BS381C' } {'353 Deep Cream' }
{'Foster' } {'Butterscotch' }
{'ISCC' } {'67 Brilliant Orange Yellow'}
{'R' } {'Goldenrod2' }
{'Resene' } {'Ronchi' }
{'SherwinWilliams'} {'6676 Butterfield' }
{'Thesaurus' } {'Yellow: Mustard' }
{'Wikipedia' } {'Maximum Yellow Red' }
{'X11' } {'Goldenrod2' }
{'xkcd' } {'Macaroni And Cheese' }
% compare the matches (left) to the original color (right)
imshow(swatchchart)

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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Blue についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!