It sounds like you're after linear interpolation - in your case, interpolating from white to the specified colour. For example, in C#:
public IEnumerable<Color> Interpolate(Color from, Color to, int steps)
{
int range = steps-1; // Makes things a bit easier
for (int i=0; i < steps; i++)
{
// i is the proportion of the "to" colour to use.
// j is the proportion of the "from" colour to use.
int j = range - i;
int r = ((from.R * j) + (to.R * i)) / range;
int g = ((from.G * j) + (to.G * i)) / range;
int b = ((from.B * j) + (to.B * i)) / range;
yield return new Color(r, g, b);
}
}
Of course there are other ways of doing it besides a linear interpolation, but that's likely to be the simplest. Note that this gets tricky if you have a lot of steps or larger values, because you need to consider the possibility of overflow. In this case you should be okay though - you're unlikely to want more than 256 steps, and the maximum value is 255, so you won't get close to the limits of int
s.
EDIT: As noted in comments, RGB may well not be the best domain in which to use linear interpolation. You may be best off converting the from/to RGB values into HSL or HSV, and doing interpolation on those. This may be easy or tricky depending on your platform. The wikipedia link in the previous sentence gives formulae for the appropriate calculations if they're not provided for you.