OK, I can't find great references for the Harvey-Collier test; they appear to almost all be paywalled. However, the intuition behind the rainbow test is easy to describe.
Suppose you're trying to fit a linear model where it's inadequate. Let's use a very simple quadratic model for example: $X \sim N(1, 1); Y \sim X^2 + N(0, 0.2)$.
The idea of the rainbow test is that, when you "zoom in" on the curve $Y = X^2 + \epsilon$ (by looking only at the central data), the curve looks less curvy--more like a line--and so the model's fit improves. So for instance, if we make a linear model on a full dataset of 100 draws from the model above, here's what we get:
By contrast, if we restrict to points 1 SD away from the mean, here's what we get:
As you can see, the fit improves noticeably, and the restriction also looks visibly more like a linear model.
On the other hand, if the true model were linear, we wouldn't expect the fit to get much better in this scenario. (It might get a little better, because we'd be fitting to fewer data points, but linear regression would converge to the same model on the restricted data as the full dataset, so in the limit you'd get the same model on both.)
The rainbow test basically quantifies how much better we'd expect the fit to get when we remove data, under the null hypothesis that the true model is linear. If the true model is not linear, then the improvement will be bigger than we expected.
As for your specific question about the direction of the tests, the documentation for
The Harvey-Collier test performs a t-test (with parameter degrees of freedom) on the recursive residuals. If the true relationship is not linear but convex or concave the mean of the recursive residuals should differ from 0 significantly.
(Emphasis added.) This means that a significant result means that you can reject the null hypothesis that the true model is linear.
Similarly, the documentation for
The basic idea of the Rainbow test is that even if the true relationship is non-linear, a good linear fit can be achieved on a subsample in the "middle" of the data. The null hypothesis is rejected whenever the overall fit is significantly worse than the fit for the subsample.
This means that a significant result (rejecting the null) occurs when the fit is better with a range restriction (which is what happens if the model is nonlinear).
So both tests suggest that the true model is not linear.