We consider max coloring on hereditary graph classes. The problem is defined as follows. Given a graph G∈=∈(V,E) and positive node weights w:V →[1,∈∞∈), the goal is to find a proper node coloring of G whose color classes C 1,C 2, ..., C k minimize . We design a general framework which allows to convert approximation algorithms for standard node coloring into algorithms for max coloring. The approximation ratio increases by a multiplicative factor of at most e for deterministic offline algorithms and for randomized online algorithms, and by a multiplicative factor of at most 4 for deterministic online algorithms. We consider two specific hereditary classes which are interval graphs and perfect graphs. For interval graphs, we study the problem in several online environments. In the List Model, intervals arrive one by one, in some order. In the Time Model, intervals arrive one by one, sorted by their left endpoint. For the List Model we design a deterministic 12-competitive algorithm, a randomized 3e-competitive algorithm, and prove a lower bound of 4 on the (deterministic or randomized) competitive ratio. For the Time Model, we use simplified versions of the algorithm and the lower bound of the List Model, to achieve a deterministic 4-competitive algorithm, a randomized e-competitive algorithm, and lower bounds of φ∈≈∈1.618 on the deterministic competitive ratio and on the randomized competitive ratio. The former lower bounds hold even for unit intervals. For unit intervals in the List Model, we obtain a deterministic 8-competitive algorithm, a randomized 2e-competitive algorithm and lower bounds of 2 on the deterministic competitive ratio and on the randomized competitive ratio. Finally, we employ our framework to obtain an offline e-approximation algorithm for max coloring of perfect graphs, improving and simplifying a recent result of Pemmaraju and Raman.