필터 지우기
필터 지우기

Is there a color database existent?

조회 수: 5 (최근 30일)
Zeff020
Zeff020 2017년 5월 26일
편집: Stephen23 2017년 5월 26일
Is there a simple color database existent containing a bunch of RGB colors which I could use in my script to create colored images?
e.g. I'd like to be able to do this
image(LG) %%-> selects LG from database which gives a light green image

채택된 답변

Stephen23
Stephen23 2017년 5월 26일
편집: Stephen23 2017년 5월 26일
Download my FEX submission colornames:
then simply create an array using those colors, and show that using image or imshow:
>> [~,rgb] = colornames('SVG','LightGreen');
>> A = reshape(rgb,1,1,3)
>> image(A)
Note that colornames supports many common color palettes, yet is very simple to use:
[clr,rgb] = colornames('HTML4','blue','red','teal','olive')
clr =
'Blue'
'Red'
'Teal'
'Olive'
rgb =
0 0 1
1 0 0
0 0.50196 0.50196
0.50196 0.50196 0

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by