This is how to extract RGB values from a Color Int value
am I missing something? why the complexity? why not use use & ? like 0x00FF000 or 0x0000FF, etc. and shift it
You agree to website policy and terms of use
While making the Heat Map Multicolor indicator I needed some colors functions. I used the two functions rgb2int() and colorgradient() published on http://www.thetradingtheory.com/colors-in-mql4/ (thanks to zenhop for sharing). These two functions do what they say: the 1st one rgb2int() returns an Integer from 3 RGB inputs, and colorgradient() helps drawing a gradient of colors from two sets of RGB values.
In order to give the user the choice of colors I had to convert the value of extern color Hot into RGB values, so I created the following functions, I hope you find them usefull.
Regards
MT-Coder