I am referring to the fact that there are more or less simple algorithms you can use to determine the dark version of colors, or rather, perceptually darker variants (e.g. APCA). The browser could make the contrast threshold configurable.
Oh, and there is inverse(), but I have no idea how good that is.