Given a graph G, the graph has the same vertex set and two vertices are adjacent in if and only if they are at distance at most l in G. The l-coloring problem consists in finding an optimal vertex coloring of the graph , where G is the input graph. We show that, for any fixed value of l, the l-coloring problem is polynomial when restricted to graphs of bounded NLC-width (or clique-width), if an expression of the graph is also part of the input. We also prove that the NLC-width of is at most .