An \emph{acyclic coloring} of a graph is a proper vertex coloring such that
the union of any two color classes induces a disjoint collection of trees. The
more restricted notion of \emph{star coloring} requires that the union of any
two color classes induces a disjoint collection of stars. We prove that every
acyclic coloring of a cograph is also a star coloring and give a linear-time
algorithm for finding an optimal acyclic and star coloring of a cograph. If the
graph is given in the form of a cotree, the algorithm runs in O(n) time.