Microscopic approach to colloid stability