Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[V8i VBA] Colour theory - ForeColour vs BackColour text readability

$
0
0

I'm trying to maintain readability of text (forecolour property) in a form control (the text is normally black) and if the backcolour property is also black or similar the text isn't readable. My initial thoughts would be to calculate the inverse of the backcolour though I'm not sure how to deal with a colour of 127,127,127.

Ideally I would prefer to keep the value in the grayscale range as opposed to true inverse colour. I've looked through the VBA help and can't see anything so I'm wondering:

  • is there an MDL function that can calculate it which be used in VBA
  • does someone knows the mathematics to calculate it?
  • Is there another way of achieving it.

I'll keep searching google in the to see if I can find a solution and will post back if I am successful.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>