The color legends should display the unknown color if it is set, possibly with an unknownLabel that default to "unknown" (or "N/A", "invalid"?)
Note that if d3.scale adds scale.high / scale.low (or under/over, or extremes…) #258, these parameters should also be shown in the legends if they are set.
H/T @ananya-roy