Using coloring optimization or coloring decision to solve coloring search
Given a graph $G$, we want to do two things:


Find the smallest $k$ such that $G$ is $k$-colourable,
Given such a $k$, find a colouring of $G$ with $k$ colours.


If we have an oracle for the decision version of the colouring problem, we can do both.

For the first part we can perform a search to find the optimal $k$. Even the naive approach here is okay, we can just sequentially ask if $G$ is $k$-colourable for $k=1,2,\ldots,n$. Then we make at most $n$ calls to the oracle. Of course we can perform a binary search and cut this down to $\log n$ calls. (Note that this is also how we solve the optimization version with the decision version).

Then given that we've worked out what $k$ is optimal, we can find a $k$-colouring of $G$ using the decision oracle. The only wrinkle is that the oracle doesn't take partial colourings, so we need a way of encoding in the graph that a particular vertex has been coloured a particular colour.

To do this we actually use the oracle on an auxilliary graph, which we will call $G^{+}$, that is $G$ plus a $K_{k}$ with some additional edges. Of course the $K_{k}$ needs exactly $k$ colours, so we can use its vertices to indicate which colours are available for a vertex. Let the vertices $\{k_{1},\ldots,k_{k}\}$ of the $K_{k}$ correspond to the colours $\{c_{1},\ldots,c_{k}\}$. Then we will indicate that a vertex $v$ in $G$ cannot be coloured with colour $c_{i}$ by making it adjacent to $k_{i}$. Furthermore if we colour a vertex with colour $c_{j}$ we will make it adjacent to every $k_{i}$ with $i\neq j$ (and not adjacent to $k_{j}$).

Then we repeatedly do the following:


Pick an 'uncoloured' vertex $v \in V(G)$.
For every vertex $u \in N(v)$, if $u$ has been coloured, then there is one $k_{i}$ such that $uk_{i} \notin E(G)$. Add the edge $vk_{i}$ to $E$.
For the remaining vertices $k_{j}$ such that $vk_{j}$ is not yet in $E$, we add all other edges between $v$ and the $K_{k}$ and ask the oracle if the new graph is $k$-colourable. If it is, we keep this graph and move on to the next vertex, if the answer is No, we undo step 3 and try with the next $k_{j}$.


Note that as $G$ is $k$-colourable, there is some $k_{j}$ that step three will work with. Then when we have processed every vertex, each vertex in $G$ is not adjacent to exactly one vertex in the $K_{k}$, this indicates which colour the vertex can be coloured with to obtain the colouring. From step 2, we see that this cannot be the same colour as any of its neighbours.

At step three we make at most $k$ calls to the oracle, and we do this for each vertex in $G$, so in total we make at most $(k+1)n$ calls to the oracle (including the search for $k$).