Hmm, I don't know, I think it is best to find something about calculating hue/saturation/lightness on internet, but this program goes from black to a color and then to white:
Graphics 800, 600, 0, 2 r = 255 g = 255 b = 0 For ii = 0 To 255 * 2 If ii < 256 Then rr = r * ii / 255 gg = g * ii / 255 bb = b * ii / 255 Else rr = r + (ii Mod 256) gg = g + (ii Mod 256) bb = b + (ii Mod 256) If rr > 255 Then rr = 255 If gg > 255 Then gg = 255 If bb > 255 Then bb = 255 End If Color rr, gg, bb Rect x, y, 10, 10 x = x + 10 If x > 790 Then x = 0: y = y + 10 Next WaitKey() End