How to set custom / more (R, G, B) colors in Grace, Xmgrace UV-CDAT

Hello there,

If you want to set custom or more R,G,B colors in Xmgrace or Grace do the following steps.

Step 1 : go to /usr/share/grace

$ cd /usr/share/grace

Step 2:

there is a file named as gracerc.user

Now edit that file with sudo or root permission and paste the below lines into that file.

map color 0 to (255, 255, 255), “white”

map color 1 to (0, 0, 0), “black”
map color 2 to (255, 0, 0), “red”
map color 3 to (0, 255, 0), “green”
map color 4 to (0, 0, 255), “blue”
map color 5 to (255, 255, 0), “yellow”

map color 6 to (188, 143, 143), “brown”
map color 7 to (220, 220, 220), “grey”
map color 8 to (148, 0, 211), “violet”
map color 9 to (0, 255, 255), “cyan”
map color 10 to (255, 0, 255), “magenta”

map color 11 to (255, 165, 0), “orange”
map color 12 to (114, 33, 188), “indigo”
map color 13 to (103, 7, 72), “maroon”
map color 14 to (64, 224, 208), “turquoise”
map color 15 to (0, 139, 0), “green4”

Now you save that file and go to open grace gui or plot your colors with the above 15 index to chose appropriate color.

* Those values inside the tuple is rgb values.
* The number after “map color” is the color index
* and after the tuple the string is any name u like

If you want to add custom or more colors then add lines like below.
Here I added light black color with index 16 and its rgb value.

Likewise added for light red color with index 17 and its rgb value.

map color 16 to (100, 90, 90), “lblack”
map color 17 to (250, 90, 90), “lred”

Append the above 2 custom colors into /usr/share/grace/gracerc.user

* add as many colors as u like !

To choose (R, G, B) colors you may use the following online rgb color pickers.

http://www.rapidtables.com/web/color/color-picker.htm

http://www.colorpicker.com/

🙂

Advertisements

About arulalant

Currently working as "Project Scientist – C" in National Centre for Medium Range Weather Forecasting (NCMRWF), MoES, Noida, India
This entry was posted in UVCDAT and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s