is there a possibility to use a selector which defines a group of colors which are close to black
No. Selectors doesn't have any knowledge of color whatsoever.
You're going to have to write your own algorithm to determine whether the foreground color should be light or dark based on the background color. And if you're trying to get things done, that means JavaScript. If you're trying to develop a CSS-only proof-of-concept for the sake of experimentation, you can take a stab at emulating regular expressions (assuming they are, as you seem convinced, possible to implement using Selectors) and seeing if what you end up with resembles an actual color-matching algorithm and produces accurate and consistent results. If you do come up with a solution that actually works, without cheating by changing the attribute value to something that makes it as easy as writing a non-algorithmic selector, feel free to post an answer with a case study.
My point is that Selectors doesn't offer a feature that's designed for your specific use case, and whatever time that might get put into developing what is essentially a hack is probably better spent on an actual, practical solution.
I tend to not believe comments without backup info.
Look, I could link you to the spec, but I'm not going to be able to link you to any particular section of the spec, simply because the spec doesn't mention such functionality anywhere, for the sole reason that the working group never considered speccing such a feature in the first place. It is up to you whether or not you want to accept this fact. Neither I nor the authors of the spec nor the people who work on layout engines nor anyone else in the working group is obligated to justify to you or anyone else whether or not a non-existent feature would be feasible to spec, implement, test, and ship.
Of course, if you want to get really pedantic, there's technically nothing stopping the working group from proposing, say, a functional pseudo-class that takes a string that represents a color as an argument and matches elements based on the criteria you've listed above. In fact, you are free to implement Selectors yourself (or take a ready-made albeit non-standard implementation such as Sizzle) and implement such a feature if you're so inclined. But if you really want an informed opinion from an expert, it is highly unlikely that such a feature would be useful to a wide enough audience to warrant all the development time and effort on part of browser vendors or the working group.