Error Insertion Point Background Highlight

I like to use a dark background in the Editor, but I have a hard time locating the insertion point where an error is highlighted (and when I code there is often an error :). Can someone direct me to the location of changing the background color of that error insertion point?

The “Error message” color box in the Colors tab in the Preferences dialog does not seem to be the place to make the change. Anyone know where it can be edited?


Please send a screenshot showing what you are after.

Error background color

This is what's hard for me to see with a dark background color >> see Pinbar at the end of row 13.

1 Like

OK, I see what you mean. This color is not customizable at the moment. The “error message” color settings is for something else (i.e. for color of run-time error displayed in the chart pane).

okay. thanks. Please consider it an enhancement request. A lot of us have
multiple monitors and getting brightness low or a dark background is
attractive work environment. Thanks again.

Yes, but it is not just one color. It is not that simple. These markers are semi-translucent with alpha channel so color is a result of some pixel by pixel calculation. It will be easier just to increase alpha because color setting would lead to confusion (this is drawn with 25% alpha so if user selected bright green it won't be bright green but dark semi-translucent green on dark backgrounds and nearly white on white backgrounds).

But did some experiments and now in development version the contrast is increased:


This should address the problem just fine.

@Tomasz because the "translucent" word appeared in this thread, let me ask about something. This is rather only a theoretical question (do not treat it as a request) as it would probably require some major changes in AmiBroker's graphics engine. Is it possible to implement in the future an option to automatically change the color of some overlapping graphical elements? For example it might be useful in creating some kinds of "heatmaps".

In example if I visualise some values as circles filled with 10% gray and those circles overlap - the overlapping parts should be darker. If 2 circles overlap on each other, the combined area should be filled with 20% grey, if 3 circles overlap - 30% gray etc. Similar to this example:


I know this (as everything else) can be accomplished programatically, but it seems a very demanding task - especially in case of many elements. Would it be possible (for the user) to achieve this effect by only changing one parameter in some Gfx line?

Thank you :slight_smile:

That is alpha channel transparency / alpha blending. There is no simple “parameter” for that in Gfx functions. Alpha channel transparency requires pixel-by-pixel RGB multiplication of everything you draw.
In best case scenario it 5 times slower than normal opaque draw (instead of writing say 4 bytes, you need to read 8 bytes - source and destination, perform 4 multiplications, 4 additions and store 4 bytes) Windows GDI (that AmiBroker uses) only allows alpha blending of rectangular shapes (AlphaBlend). Alpha blending on graphic primitives level is only supported by Direct2D / Direct3D / OpenGL but this means that you need proper graphic card. Some users use virtual machines, Linux emulated environments (Wine), Apple Parallels and/or remote terminal setups that don’t work with DirectX/OpenGL. That means that to keep things compatible with entire user base instead of two versions of application (32-bit and 64-bit) now you need to program and deliver four versions (32-bit / 64 bit GDI and 32-bit / 64-bit DirectX/OpenGL).

1 Like

Tomasz - thank you for the information :slight_smile: