Useful for spotting unescaped characters, spotting unclosed parentheses, etc. In lua's case, it might help the user identify differences between regular regex and lua regex.
Screenshot from a website that does this (https://regex101.com):

Later, could add a hover tooltip giving more info for each color.
