I have a table in which the cells may contain normal and grayed-out text. The color for normal text is chosen dynamically according to this post in order to take account that the table's background color is theme-dependent. Now I'm wondering if there's any good way to determine an appropriate "gray" color based on the table's background, so that:
Note: Other styles, such as strike-out, are not appropriate in my case, since the gray color is used to convey the idea of a table cell being "less important" than others, rather than being obsolete/unavailable/etc.
Well, your linked question selects only one of two text colors: it will be either black or white.
Did you try to just use a "dark gray" when the text color is black, and a light gray when the text color is white?