on *:INPUT:*:{
if (%colourtxton == 1) && ($left($1,1) != /) {
say 04 $+ $1-
halt
}
elseif (%colourtxton == 2) && ($left($1,1) != /) {
say 12 $+ $1-
halt
}
}
Use $+ to combine things without spaces, and always use 2 digits for colors (even if the color number is under 10). Otherwise, it may combine numbers if the first character in the text is a number and you'll have the wrong color.
For the halting (so you only see the changed text), it's set up correctly. However, other on INPUT scripts may break the halting ability of the script. For example, using on &*:input: may prevent you from being able to halt the event. As mentioned, you can insert your on INPUT script into another on INPUT script to help fix the problem.