Set "pre-defined" colors

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

jfoster4731
Posts: 3
Joined: Thu Jul 10, 2014 1:42 am

Set "pre-defined" colors

Postby jfoster4731 » Sat Sep 20, 2014 11:54 pm

Hello,

I am writing a program to make a graph. E-views 8 has a set of predefined colors: blue, red, green, etc, and it is also possible to select colours using @RGB(#,#,#). Is there a way to use the @RGB command to set a predefined color? For example,

setcolor cyan @RGB(225,225,255)

Then I can just write "cyan" wherever I would like that colour.

Thank you

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Set "pre-defined" colors

Postby EViews Gareth » Sun Sep 21, 2014 7:58 am

There is not, no.

You might be better off using templates, if you're using the same colours a lot.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Set "pre-defined" colors

Postby EViews Gareth » Sun Sep 21, 2014 8:21 am

or, you could always do something like:

Code: Select all

%cyan = "@RGB(225,225,255)"
and then use {%cyan} wherever @rgb is expected.

jfoster4731
Posts: 3
Joined: Thu Jul 10, 2014 1:42 am

Re: Set "pre-defined" colors

Postby jfoster4731 » Sun Sep 21, 2014 4:18 pm

Thank you Gareth,

That works great.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest