Here you go, a solution to both your problems in one go, Colour spelled correctly and by numbers to boot...

code:
; Demo kix script to deliver colour by numbers

; Colours seem to be broken with the console (kix32c.exe) version, so run under console-less (kix32.exe)
; Background colours will show as high intensity rather than blinking in the console.

$Back=0
While $Back < 16
$Fore=0
While $Fore < 16
If $Back <> $Fore
Colour($Fore,$Back)
"(COLOR $Fore/$Back)"
EndIf
$Fore=$Fore+1
Loop
$Back=$Back+1
Loop

color w/n
? "Hit Return " gets $s

return

Function Colour($ForeGround,$BackGround)
$ExecString="color " + LookupColour($ForeGround) + "/" + LookupColour($BackGround)
$Result=Execute($ExecString)
EndFunction

Function LookupColour($ColourValue)
$LookupColour=rtrim(substr("n b g c r m y w n+b+g+c+r+m+y+w+",$ColourValue*2+1,2))
EndFunction


This is of course coded for Kix2001, you could convert is to a subroutine with a little effort.

NB This has uncovered a few bugs (I think - have to do real work now so I can't spend time on it).
1) The console-less mode gives really bizaare results for colours, I just gave up in the end.
2) The console mode is better but some of the "x+" colours for background show as black.
3) I initially used an array for the colour lookup, but the variable scope was a pain in the proverbials. A dimensioned array within a function is destroyed on exit, and a dimensioned array in the main script is not visible in the function. Now, a "static" keyword for function variables - that'd be cool.

------------------

Richard Howarth