I have a rectangle with text labels within it. I am having the FillColor of the rectangle change will the type of data I am working with - however some of the colors are too dark to read the text.
What I want to do is keep the same color but get a lighter version of it. So for example, if the color is black, a lighter shade (say grey). Same goes for dark blues and dark greens.
d_Appt is a dictionary that stores the color value.
Here is where I am so far:
dim col as variant = d_Appt.Value(“color”).StringValue
dim c2 as Variant = col.ColorValue
RoundRectangle1.FillColor= c2
I am thinking something with transparency but I just can’t figure out how to get from here to there.
I would think you would want to measure the color of the text versus the color of the background to calculate the contrast to ensure the text is always readable. If the color of the text is static that is enough but still might be good to compare to the random color you generate for the background. Or, put constraints on the background color in your color generation algo to make sure you don’t generate something not readable.