Unfortunately, it appears that "Custom" is all we can do. The 'typename' property that you experimented with is actually read-only, so the 'pre-defined' Black color may be a result of the script not working properly past that line.
What I tried was setting one layer's color to another layer's color so that it should be the exact same one, and it still came out Custom.
Next I tried to record an action and see if the color was captured, and it was not.
It seems to me that their 'pre-defined' colors are one-way only: they appear in the dropdown list as a convenience but have no standing outside of the Layers dialog box.
there is no typename property for RGBColor.
As Silly-V said before:
var aDoc = app.activeDocument; var aLay = aDoc.layers; var layerColor = new RGBColor(); layerColor.red = 78.7; layerColor.green = 78.7; layerColor.blue = 255; aLay.name = "source"; aLay.color = layerColor; var newLayer = activeDocument.layers.add(); layerColor.red = 255; layerColor.green = 78.7; layerColor.blue = 255; newLayer.name = "built"; newLayer.color = layerColor; var newLayer = activeDocument.layers.add(); layerColor.red = 78.7; layerColor.green = 127.5; layerColor.blue = 255; newLayer.name = "final"; newLayer.color = layerColor;