Umm ... you're confusing a couple of different things here.
Seeing files and directories in different colours:
ls --color (some [in my opinion stupid] distributions do
this as an alias by default)
Editing stuff in color: has nothing to do with the above,
depends on the editor you're using.
vim - :syntax on
emacs - M-x global-font-lock-mode
others - use the man-page, Luke!