Download MetaTrader 5
To add comments, please log in or register
Download MetaTrader 5 for iPad and trade anywhere!
jbozman
85
jbozman 2013.11.28 13:02 

Hi,

As previous web designer, I understand RGB, but the code generated in the template to reference RGB colors in the color palette is foreign to me. Is there a chart available to reference RBG values which is then used in the template? I have many indicators which are only ex4, so I cannot modify the source code. It would be easier to do a "search and replace" in the tpl file, then manually change the colors on my templates and resave, then find the "object" code and remove it to reduce file size of templates. Much easier to search for 16777215 (White) where white is used, and replace with 14524637 (Plum).

Please see attached graphic.

(I'm not a programmer, so if there is a tech explanation/code reason, I may not understand. Just hoping there is a reference chart for these numbers for the standard color palette.)

Thanks so much!

Jeff


MQL4 Color Reference Chart

Simon Gniadkowski
Moderator
17991
Simon Gniadkowski 2013.11.28 13:19  
jbozman:

Hi,

As previous web designer, I understand RGB, but the code generated in the template to reference RGB colors in the color palette is foreign to me. Is there a chart available to reference RBG values which is then used in the template? I have many indicators which are only ex4, so I cannot modify the source code. It would be easier to do a "search and replace" in the tpl file, then manually change the colors on my templates and resave, then find the "object" code and remove it to reduce file size of templates. Much easier to search for 16777215 (White) where white is used, and replace with 14524637 (Plum).

Doesn't this tell you ? https://docs.mql4.com/basis/types/color
whroeder1
14233
whroeder1 2013.11.28 13:33  
Colors are Web colors - MQL4 Documentation

So if you Googled Web colors you would have found in 5 seconds the hex values X11 color names - Wikipedia, the free encyclopedia

And the standard windows calculator can convert hex to decimal (alt-3)

jbozman
85
jbozman 2013.12.04 18:14  
RaptorUK:
Doesn't this tell you ? https://docs.mql4.com/basis/types/color


No...not helpful at all. Thanks anyway.
jbozman
85
jbozman 2013.12.04 18:18  
WHRoeder:
Colors are Web colors - MQL4 Documentation

So if you Googled Web colors you would have found in 5 seconds the hex values X11 color names - Wikipedia, the free encyclopedia

And the standard windows calculator can convert hex to decimal (alt-3)




This was years ago I was a web designer. I lost touch with coding and only retained some basic stuff. I appreciate your response and will look into this. But to assume I should've known what to Google and then convert hex to dec? That wasn't even something I was aware of. Again, I appreciate your help. Thanks.
Simon Gniadkowski
Moderator
17991
Simon Gniadkowski 2013.12.04 18:23  
jbozman:

No...not helpful at all. Thanks anyway.

It gives you what you need . . . perhaps it is beyond your comprehension ?

"Its internal representation is a long integer number of 4 bytes. The first byte will not be considered. The other three bytes contain RGB components."

Plum is x00 DD A0 DD 4 bytes, the first is ignored leaving RGB or decimal 14524637

/
To add comments, please log in or register