adding color to selected vertices

It works like the paint bucket tool in an image editor. Shift K is the shortcut.

This may help: http://blender.stackexchange.com/questions/31160/is-it-possible-to-paint-only-on-selected-vertices-in-vertex-paint

I knocked together a script also. Open or paste in a text window, Alt P. More comprehensive instructions are within.

# Vertex Paint Flood Fill: Selected Faces Only
# By LoboTommy, circa Blender 2.78, 20161218.
# All rights reserved to this script.
# No claims made to content produced with it.

# This script is cursed worse than Frogurt.
# Fairly warned be thee.

# Commented out instructions below:

# Once: Isolate object on an empty layer. View-port > M key.
# Open a Text Editor window.
# Create a new text block and paste this script into it.

# Repeat: Set a color in Vertex Paint mode.
# Tab into Edit mode and select the faces to be painted.
# !!Partially selected faces will halt the script before painting!!
# Use face select rather than edge or vertex.
# !!Can't have all vertices selected, this will halt the script!!
# Equivalent to Shift K anyway.
# Mouse over the Text Editor window, hit Alt P to run the script.

# If successful you'll see your vertex color applied.
# If not check for extra objects. Ctrl Z if needed.
# Make note of the vertex count also. It shouldn't increase,
# but may decrease due to doubles removal.

# More comments / notes / caveats amongst the code:

import bpy

# Split mesh to avoid interpolation artefacts.
# Bug? Hack? Check DCC interchange preservation.

bpy.ops.mesh.split()
bpy.ops.mesh.select_all(action='INVERT')
bpy.ops.mesh.separate(type='SELECTED')

# Apply selected color to selected vertices.

bpy.ops.object.mode_set(mode='VERTEX_PAINT')
bpy.ops.paint.vertex_color_set()

# Join split objects back together.
# Dumb, so quarantine object in own layer.
# To do: Detect empty layers or filter objects?

bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='TOGGLE')
bpy.ops.object.select_all(action='TOGGLE')
bpy.ops.object.join()

# Dumb! Cleans up ALL duplicated vertices.
# Not just those created by the script.
# To do: Selectively preserve duplicate vertices.

bpy.ops.object.mode_set(mode='EDIT') 
bpy.ops.mesh.select_all(action='TOGGLE')
bpy.ops.mesh.remove_doubles()

# Back to color selection step.

bpy.ops.object.mode_set(mode='VERTEX_PAINT')