public static @NotNull NamedTextColor nearestTo(final @NotNull TextColor any) {
    if (any instanceof NamedTextColor) {
      return (NamedTextColor) any;
    }

    return TextColor.nearestColorTo(VALUES, any);
  }
Find the named colour nearest to the provided colour.

@param any colour to match
@return nearest named colour. will always return a value
@since 4.0.0
api/src/main/java/net/kyori/adventure/text/format/NamedTextColor.java