Let c: V(G) -> {1, . . . , & ell;} = [& ell;] be a proper vertex coloring of G and C(i) = {u is an element of V(G): c(u) = i} for i is an element of [& ell;]. The k-color code r(k)(v|c) of vertex v is the ordered & ell;-tuple (a(G)(v,C(1)), . . . , a(G)(v,C(& ell;))) where aG(v,C(i)) = min{k,min{dG(v,x) :x is an element of C(i)}}. If every two vertices have different color codes, then c is a (k, & ell;)-locating coloring of G. The k-locating chromatic number of graph G, denoted by , is the smallest integer & ell; such that G has a (k, & ell;)-locating coloring. In this paper, we propose this concept as an extension of diam(G)-locating chromatic number and 2-locating chromatic number which are known as the locating chromatic number, denoted chi(L)(G), and neighbor-locating chromatic number, denoted , respectively. In this paper, we give sharp bounds for and where G degrees H and are the corona and edge corona of G and H, respectively. We formulate an integer linear programming model to determine , noting that almost all graphs have diameter 2 and for every graph G of diameter 2.