How to make different colored text?

I want to know how to make a screen with text in different colors that for example the text in the “brackets” Weill be red and the word function purple and words that will be after self (self.example), blue? Is there any way to do it?

What I think you’re asking about is syntax highlighting for Lua. You’ll need to read up on Lua pattern-matching for string.gsub, string.match etc. Start with the in-app reference for pattern matching, then google some examples.

Here’s an example, but for Markdown, not Lua:

What you’re asking for though is extremely complicated to get 100% right (occasionally even the Codea editor gets it wrong, in certain limit-cases). If I were you @TokOut I’d get comfortable with the basics of Lua before attempting something advanced like syntax-highlighting.

No I mean an editor with keyboard etc. an the text you will write will be highlighted

Ok, in that case you want an interpreter. It doesn’t have the syntax highlighting, but it does suggest/autocomplete Lua/Codea commands by querying _G:

Try the repo here. If you’re using iOS 9, turn off the extra keyboard row, as it covers up the autocomplete suggestions bar: