Vertex Color:
Assuming that you mean Vertex colors, and that you want to get it in the node editor, then you would type the name of the vertex color layer into the attribute node:

From the wiki:
Retrieve attribute attached to the object or mesh. Currently UV maps and vertex color layers can be retrieved this way by their names, with layers and attributes planned to be added. Also internal attributes like P (position), N (normal), Ng (geometric normal) may be accessed this way, although there are more convenient nodes for this.
Note that if you have a UV layer with the same name it will be used instead.
Object Color:
For the Object Color property, the answer is no, this is not possible with the Attribute node currently.
You could try using a driver to get the color into a node tree, however I don't think it will do what you want it too. The driver can only access the object color of one object at a time, so you wouldn't be able to use a different color per object in one material.
As an alternative, you could specify the different colors in the node setup by using object pass indexes and the Object Info node:
Create an "equal to" nodegroup:

Then setup something like this:

If the object index is 1
, the object will be green.
If the object index is 2
, the object will be cyan.
If the object index is not 1
or 2
, it will be red.
The object info node uses the Pass index of the object as the index. You can set the Pass index in Properties > Object > Relations:

You could write a python script to automatically set the colors, Pass index, and create the appropriate nodes for all the objects in your scene.
Here is a script (thanks to iKlsR and sambler for answering my questions here, here, and here) that will automatically setup the pass indexes and create an "Object Color" node group which you can add to your node setups:
import bpy
# Add "equal to" node group:
group = bpy.data.node_groups.new(type="ShaderNodeTree", name="Equal to")
group.inputs.new("NodeSocketFloat", "Value")
group.inputs.new("NodeSocketFloat", "Value")
input_node = group.nodes.new("NodeGroupInput")
input_node.location = (0, 0)
group.outputs.new("NodeSocketFloat", "Value")
output_node = group.nodes.new("NodeGroupOutput")
output_node.location = (600, 0)
# Add a greater than node
gtr_math_node = group.nodes.new(type='ShaderNodeMath')
gtr_math_node.operation = "GREATER_THAN"
gtr_math_node.name = "greater"
gtr_math_node.location = (200, 100)
group.links.new(input_node.outputs[0], gtr_math_node.inputs[0])
group.links.new(input_node.outputs[1], gtr_math_node.inputs[1])
# Add a less than node
lss_math_node = group.nodes.new(type='ShaderNodeMath')
lss_math_node.operation = "LESS_THAN"
lss_math_node.name = "less"
lss_math_node.location = (200,-100)
group.links.new(input_node.outputs[0], lss_math_node.inputs[0])
group.links.new(input_node.outputs[1], lss_math_node.inputs[1])
# Add an add node
add_math_node = group.nodes.new(type='ShaderNodeMath')
add_math_node.operation = "ADD"
add_math_node.name = "add"
add_math_node.use_clamp = True
add_math_node.location = (400, 0)
# connect nodes
group.links.new(gtr_math_node.outputs["Value"], add_math_node.inputs[0])
group.links.new(lss_math_node.outputs["Value"], add_math_node.inputs[1])
group.links.new(add_math_node.outputs["Value"], output_node.inputs[0])
# Create main "Object Color" node group
main_group = bpy.data.node_groups.new(type="ShaderNodeTree", name="Object Color")
main_group.outputs.new("NodeSocketColor", "Object Color")
output_node = main_group.nodes.new("NodeGroupOutput")
output_node.location = (600, 0)
#Add object info node:
ob_index = main_group.nodes.new(type="ShaderNodeObjectInfo")
ob_index.location = (-600,0)
index = 1
# Iterate through all objects in the current scene, set the path indexes and create nodes with the object color
for object in bpy.context.scene.objects:
if object.type != 'CAMERA' and object.type != 'EMPTY' and object.type != 'LAMP':
object.pass_index = index
col = object.color
if col != (1,1,1,1):
# add frame node:
frame = main_group.nodes.new(type="NodeFrame")
frame.location = (-70, index*200)
frame.label = object.name
frame.use_custom_color = True
frame.color = (0,.005,.133)
# Add equalto node:
group_node = main_group.nodes.new("ShaderNodeGroup")
group_node.node_tree = group
group_node.label = "Equal to"
group_node.location = (-200, index*200)
group_node.name = "eq_" + str(index)
main_group.links.new(ob_index.outputs["Object Index"], group_node.inputs[0])
group_node.inputs[1].default_value = index
# Add mixRGB node:
mix_node = main_group.nodes.new(type="ShaderNodeMixRGB")
mix_node.location = (100, index*200)
mix_node.name = "mix_" + str(index)
main_group.links.new(group_node.outputs["Value"], mix_node.inputs["Fac"])
mix_node.inputs["Color1"].default_value = col
if index != 1:
main_group.links.new(main_group.nodes["mix_" + str(index-1)].outputs["Color"], mix_node.inputs["Color2"])
else:
mix_node.inputs["Color2"].default_value = (1,1,1,1)
index = index + 1
else:
print ("ob-color is white")
else:
print ("is camera or lamp")
main_group.links.new(mix_node.outputs["Color"], main_group.nodes["Group Output"].inputs["Object Color"])
# Optional: uncomment the following to add the node group to the active material automatically:
#tree = bpy.context.object.active_material.node_tree
#group_node = tree.nodes.new("ShaderNodeGroup")
#group_node.node_tree = main_group
#group_node.label = "Object Color"
Note that it sets the pass index for every object in the current scene that is not a Lamp, Camera, or an Empty. If you have pass indexes already set, this script will overwrite them.
Usage:
This is script can be run by pasting it into the Text editor and clicking Run Script. This will create the "Object Color" node group with all the nodes and colors set according to the actual Object Color property.
You can add this group to your setups by pressing ShiftA> Add > Node > Group > Object Color.
To change the colors, press Tab with the node group selected to edit it and change the colors of the Color1 slots on the mix nodes.
To update it for new objects etc. you will have to run the script again and create another node group.