For doing color transitions from one rgb to another without the need of palettes:

**Code:**'midInk for JB from
'midInk test.sdlbas [B+=MGA] 2017-04-06
'how to do a bunch of color transitions WITHOUT a bunch of palettes
global H$, XMAX, YMAX
H$ = "#gr"
XMAX = 800
YMAX = 700
nomainwin
WindowWidth = XMAX + 8
WindowHeight = YMAX + 32
UpperLeftX = (1200 - XMAX) / 2 'or delete if XMAX is 1200 or above
UpperLeftY = (700 - YMAX) / 2 'or delete if YMAX is 700 or above
open "midInk Test for JB" for graphics_nsb_nf as #gr
#gr "setfocus"
#gr "trapclose quit"
#gr "down"
#gr "fill black"
loopcnt = 0
while 1
'create 2 random rgb colors, draw frames at 10% increments
r1 = rand(0, 255) : g1 = rand(0, 255) : b1 = rand(0, 255)
r2 = rand(0, 255) : g2 = rand(0, 255) : b2 = rand(0, 255)
for i = 10 to 1 step -1
call midInk r1, g1, b1, r2, g2, b2, i*10
#gr "place ";XMAX/2 - 200 - i*10;" ";YMAX/2 - 200 - i*10
#gr "boxfilled ";XMAX/2 + 200 + i*10 + 1;" ";YMAX/2 + 200 + i*10 + 1
next
select case loopcnt mod 3
case 0 : r = 255 : g = 0 : b = 0
case 1 : r = 0 : g = 255 : b = 0
case 2 : r = 0 : g = 0 : b = 255
end select
for i = 200 to 2 step -1
call midInk 255, 255, 255, r, g, b, 100 - i/2 'flip the percent
#gr "place ";XMAX/2;" ";YMAX/2;"; circlefilled ";i
next
call pause 300
loopcnt = loopcnt + 1
wend
wait
'featured sub
'ink the color that is percent between the first color and 2nd color
sub midInk r1, g1, b1, r2, g2, b2, percent
dr = (r2 - r1) / 100 : dg = (g2 - g1) / 100 : db = (b2 - b1) / 100
#H$ "color ";r1 + dr * percent;" ";g1 + dg * percent;" ";b1 + db * percent
#H$ "backcolor ";r1 + dr * percent;" ";g1 + dg * percent;" ";b1 + db * percent
end sub
function rand(n1, n2)
if n1 > n2 then hi = n1 : lo = n2 else hi = n2 : lo = n1
rand = int((hi - lo + 1) * rnd(0)) + lo
end function
sub pause mil 'tsh version has scan built-in
t0 = time$("ms")
while time$("ms") < t0 + mil : scan : wend
end sub
sub quit H$
close #H$
end
end sub