フィルターのクリア

code for color matlab

5 ビュー (過去 30 日間)
Shan  Chu
Shan Chu 2019 年 3 月 26 日
編集済み: Adam Danz 2019 年 3 月 26 日
Hi all,
I am reading a paper and very impressive with the color that the authors used in the graphs.
So I would like to ask how to construct the color code for those colors? I knew that the color in Matlab is defined by [x y z] which relates to how much the green, red and blue contribute.
Thanks
Capture.JPG

採用された回答

Adam Danz
Adam Danz 2019 年 3 月 26 日
編集済み: Adam Danz 2019 年 3 月 26 日
1) Use software that has a color dropper so you can select the colored object and get its RGB values. Here's a simple, free, website where you can upload a photo, select the color, and it will return the RGB values. https://imagecolorpicker.com/
2) If the RGB values are not in decimal form, divide by 255. For example, if the RGB values are [56, 105, 137] then convert them to matlab's normalized values: rgb = [56, 105, 137] / 255;
3) set the color in your code: plot(x,y, 'color', rgb)
  1 件のコメント
Shan  Chu
Shan Chu 2019 年 3 月 26 日
Thank you so much.
It works perfectly :D

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by