Variable: face-near-same-color-threshold
face-near-same-color-threshold is a variable defined in xfaces.c.
Value
30000
Documentation
Threshold for using distant-foreground color instead of foreground.
The value should be an integer number providing the minimum distance
between two colors that will still qualify them to be used as foreground
and background. If the value of color-distance, invoked with a nil
METRIC argument, for the foreground and background colors of a face is
less than this threshold, the distant-foreground color, if defined,
will be used for the face instead of the foreground color.
Lisp programs that change the value of this variable should also
clear the face cache, see clear-face-cache.
Probably introduced at or before Emacs version 27.1.
Source Code
// Defined in /usr/src/emacs/src/xfaces.c
DEFVAR_INT ("face-near-same-color-threshold", face_near_same_color_threshold,
doc: /* Threshold for using distant-foreground color instead of foreground.
The value should be an integer number providing the minimum distance
between two colors that will still qualify them to be used as foreground
and background. If the value of `color-distance', invoked with a nil
METRIC argument, for the foreground and background colors of a face is
less than this threshold, the distant-foreground color, if defined,
will be used for the face instead of the foreground color.
Lisp programs that change the value of this variable should also
clear the face cache, see `clear-face-cache'. */);