Discussion with Howard - How Ensign determines colors for chart scale/font

13:28 CB: Does anyone know what controls the text and background color of the current price on a chart (one by the arrow) - I have looked in chart properties and can not figure out what does it - thanks?

13:33 @Ensign-Howard: CB, the font color and the background color for the cursor price by the arrow are going to be in the inverse colors of the scale font and the chart background

13:34 @Ensign-Howard: So picking the font color auto picks the inverse color used for the cursor price. Picking the background color auto picks the background color used for the cursor price area

13:35 @Ensign-Howard: As example, if the font is white and the chart background is black, then the cursor font and background will be black on white, which is the inverse of white on black

13:36 CB: ok - but - I have a grey background and whilte font - so the chart itself is fine - but the cursor with the current price is blackish (very dark grey) and the font is black - so they are hard to read

13:36 @Ensign-Howard: see this small example, where scale is black and chart is white, so the cursor is white on black.

13:36 tt2: HA what does the inverted cursor mean?

13:37 @Ensign-Howard: Inverse is arrived at by using XOR operator on the color values. If the color value is a 255 for Red, then the XOR on these bits makes the 255 become a 0.

13:38 @Ensign-Howard: So the color gun for each Red, Green, Blue, have XOR applied and one arrives at the opposite or inverse value for that color contribution.

13:38 @Ensign-Howard: The gray is the middle value of 128, 128, 128, and the inverse of 128 is a 127. So you end up with 127,127,127 which is also a gray. So the gray looks like it did not inverse, but in reality it did and the white is 255,255,255 and its inverse is 0,0,0 which is pure black.

3:40 @Ensign-Howard: in this example chart that is gray, the inverse background is also gray and the white font has become black but the black on gray is not quite as good a contrast as the white on gray. I guess in some future upgrade I could try to add 2 more color box properties to the chart to allow you to pick colors instead of have them be automatically determined

13:39 CB: oh - now I see - so where dem XOR settings?

13:44 @Ensign-Howard: On chart property form, you get to set in the Color Theme fram the Background and the Scale Font colors. Your 2 choice here auto pick the 2 colors used by the cursor price. In my post I have black font on white background. Therefore the program auto picks the opposite colors of white font on black background for the cursor price and its method of picking the 2 colors to use is to exclusive OR the color values, every 1 bit in the color byte becomes a 0 bit, and vice versa.

3:48 CB: Getting clearer - now I will do it - thanks

13:48 @Ensign-Howard: ok bye