Let's say I have 2 colors: a solid background color (6-digit hex value) and an overlay color with opacity (6-digit hex value and some opacity percentage).
What is a function for getting the effective resultant color (6-digit hex value)? In other words, if I paint both colors over the same area (background first, then overlay) and then use a dropper tool to get the color value, how can I programmatically get the same color value?
Any programming language (even pseudocode) is fine here.