We design an algorithm to find a minimum weighted coloring of a ()-free graph. Furthermore, the same technique can be used to solve the same problem for several classes of graphs, defined by forbidden induced subgraphs, such as (diamond, co-diamond)-free graphs.