@Karlos
2 great paint programs already do that, TrueBrilliance and DPaintV. Never tried the later but the 1st can use an internal 24bit buffer. TrueBrilliance works like this: If you draw for example a white line over a 24bit image it gets drawn with normal HAM8 and so is displayed with artifacts. This is while you're drawing and keep the mouse buttom pressed. As soon as you release the mouse button the program seems to analise what you've just drawn and the HAM8 artifacts (or HAM6) gradually (and pretty fast but you can see it) disappear. It seems to be be either calculating a new pallete to cover the HAM artifacts or, even better, using the copper to change it on the fly. Many years ago I also wanted to know if it used the copper or not (probably would need to disassemble the copper instructions for a modified and a premodified image and compare them) but never bothered...
This is starting to seem like the old discussions I used to see here back in the old times:)