Sure. I have been thinking for a while it could be useful -- after all, it is an option in Illustrator. (But then we've known for years now that the programmers of InDesign Do Not Talk to the ones of Illustrator. I bet there is a Movie of the Week in that story...)
This extremely quick-and-dirty script converts a swatch of choice to Lab color, then uses the L component for the Black part in a CMYK color. It should also be possible to convert it to a tint of black, but that's just a bit more work.
(Copy, paste into Adobe's ESTK Editor, save as "SwatchToGray.jsx" into your User Scripts folder. Only works with simple RGB, Lab, or CMYK swatches; not with gradients, tints, Pantones, imported colors, mixed ink groups, or anything else that's not a simple swatch.)
//DESCRIPTION:Convert a color swatch to grayscale
// Jongware, 13-Jul-2010
var myDialog = app.dialogs.add({name:"Swatch To Gray", canCancel:true});
swatchlist = [];
namelist = [];
for (i=4; i<app.activeDocument.swatches.length; i++)
{
if (!(app.activeDocument.swatches.hasOwnProperty("baseColor") || app.activeDocument.swatches.hasOwnProperty("gradientStops")))
{
swatchlist.push(app.activeDocument.swatches);
namelist.push(app.activeDocument.swatches.name);
}
}
with (myDialog)
{
with (dialogColumns.add())
{
with (dialogRows.add())
{
staticTexts.add ({staticLabel:"Swatch"});
swatchDropDown = dropdowns.add ({stringList:namelist, selectedIndex:0});
}
}
}
if (myDialog.show())
{
// Fetch selection
swatch = swatchlist[swatchDropDown.selectedIndex];
// Convert to RGB:
swatch.space = ColorSpace.LAB;
// Make quick-and-dirty gray
gray = swatch.colorValue[0];
// Convert to CMYK
swatch.space = ColorSpace.CMYK;
// Set color
swatch.colorValue = [0,0,0, 100-gray];
}