[TextEditor] Fixed color calculation.