PyMOL is able to apply gradients to b-factors (usually a measure of the electron density spread, i.e. the mobility of an atom).
It is not uncommon to write custom data in those and then perform a gradient coloring. As you can use Python within PyMOL, the code would look like this:
cmd.alter(selection + " and resi " + residue_number, "b=" + your_score)
cmd.spectrum("b", gradient, selection=selection, minimum=min, maximum=max)
where e.g. select can be "[?]molecule_name[?] and chain [?]A[?]", gradient can be "blue_white_red". To get a list of residue names and numbers use
names = []
cmd.iterate(selection + " and n. ca and !solvent and alt a+\"\"",
"names.append(resn)")
nums = []
cmd.iterate(selection + " and n. ca and !solvent and alt a+\"\"",
"nums.append(resi)")
You can also specify exact colors in (r,g,b) and apply them individually in order to meet your exact requirements. See the PyMOL wiki for details. You can also reuse some of these scripts.
@michael can i also use the same method if i want to color the residues according to the conservation.I have the sequence with the scores can i color them according to the score in pymol?