function getcolor( x_pos, y_pos, winf, winb, wintype: byte; var fore, back: byte; msg: string ): byte; Uses a palette in which you can move around to choose the colour. If you specify a default value in fore, back, then, when ESCaping, the original is restored. The cursor then also jumpes to the right loaction.