Added color output to ismacconopen.js

Also applied DRY to return value.