The following example demonstrates how you edit SoCoResource (Layer Resource for Color Fill Layer)
[C#]stringsourceFile="ColorFillLayer.psd";stringoutputFile="SoCoResource_Edited.psd";// Load an existing image into an instance of PsdImage classvarim=(PsdImage)Image.Load(sourceFile);using(im){foreach(varlayerinim.Layers){// Finding of FillLayerif(layerisFillLayer){varfillLayer=(FillLayer)layer;foreach(varresourceinfillLayer.Resources){// Finding of SoCoResource in Layer Resource Listif(resourceisSoCoResource){varsocoResource=(SoCoResource)resource;varexpectedColor=Color.FromArgb(63,83,141);if((expectedColor.R!=socoResource.Color.R)||(expectedColor.G!=socoResource.Color.G)||(expectedColor.B!=socoResource.Color.B)||(expectedColor.A!=socoResource.Color.A)){thrownewException("Unexpected color");}// Setting the SoCoResource Color propertysocoResource.Color=Color.Red;break;}}break;}im.Save(outputFile);}}