Maximum number of colors in hypertrees of bounded degree