You can do this with actions & the batch automation feature within Photoshop. To accomplish a colored or transparent background with new size dimensions, you'd create an action set (folder icon) and create an action within that set for each color you're looking to batch.
Step 1: Create the action
Record yourself resizing the canvas for future automation
- Navigate to the actions panel or Alt+F9
- Create a new action by clicking the layer icon on the actions panel
- Do the actions you want automated
- Click the stop icon on the actions panel
While recording your specific action: (with image open)
- Go to Image > Canvas Size and change to 610x610
- Add a square shape for background
- Change color of shape to desired color / make no background for transparent
- Move beneath your image
Repeat this, creating a new color action within your action set as desired
Step 2: Setting up a batch automation
Tell Photoshop which folder of images to apply your re-sizing action to
- Go to File > Automate > Batch
- 'Play' section, choose your newly created action
- 'Source' section, choose a folder of images to apply this action to
- 'Destination' section, choose a folder where the newly re-sized images should output.
- Click Ok and your automation will begin immediately.
- Changing the canvas size will center image within the new dimensions.
- Custom actions record the things you do in Photoshop, in this case re-sizing.
- 'Action Sets' in the batch dialog are folders or groups of actions in the actions panel.