PowerShell script to create styles from ICC profiles
PowerShell script to create styles from ICC profiles
Styles residing in the styles folder of C1 can be organised into folders as desired and are easy to find and use. ICC profiles on the other hand must be used from the Color tool tab -> Base Characteristics panel -> ICC Profile drop-down menu which little or cumbersome ways to organise them, if any. I you have created some custom color profiles, or perhaps you have purchased some LUTs online, you will have a few of these .icc files lying around. Dumping them all into "%LOCALAPPDATA%CaptureOne\Color Profiles" and the drop-down menu quickly crowds up. Trying to rename .icc files following the guidelines here https://support.captureone.com/hc/en-us/articles/360002409057-How-do-I-install-and-import-my-own-color-profiles- is cumbersome and not easy to work with. If one could organise and handle ICC profiles much in the same way as one would styles, that would be practical, and here is an easy way to do so.
The following script creates styles out of any ICC profiles in the folder you run it, specifically creating .costyle files corresponding to the .icc files. The .costyle files can then be organised into folders as desired, copied into C1's styles folder ("%LOCALAPPDATA%\CaptureOne\Styles50"), and then be used much as one would otherwise use styles (or LUTs).
Procedure:
- Create a PowerShell script containing the code below and run the script in a folder with any number of .icc files in it.
- Alternatively the commands can be pasted into and run from a PowerShell window (in the correct folder).
- Copy the resulting .costyle and .icc files into C1's styles folder, into a subfolder of your choice.
- Restart C1.
Requirements and caveats:
- Basic knowledge of handling files, folders, and how to run PowerShell 7 scripts or commands is needed.
- Created using Windows 11, PowerShell 7, and Capture One 23. May or may not work on other configurations. (PowerShell 7 is indeed cross platform and this might therefore also work on a Mac, but perhaps needing modifications.)
- Any renaming of .icc files should be done before running the script as the ICC file name is used inside the .costyle code.
The code:
# Create Capture One styles from ICC profiles
#
# Place script in folder with .icc files and run it using PowerShell 7.
# 2022.12.31 Ole Andreas Ringdal
$curDir = Get-Location
$files = Get-ChildItem -Filter "*.icc"
foreach ($file in $files) {
$costyleFileName = $file.BaseName + ".costyle"
$iccFileName = $file.BaseName + ".icc"
$guid = (New-Guid).Guid
$costyleFile = "$($curDir)\$($costyleFileName)"
$contents = @"
<?xml version="1.0"?>
<SL Engine="1300">
<E K="ICCProfile" V="$($iccFileName)" />
<E K="Name" V="$($file.BaseName)" />
<E K="UUID" V="$($guid)" />
</SL>
"@
Add-Content -Path $costyleFile -Value $($contents)
Rename-Item $file.FullName ($file.BaseName + "." + $file.BaseName + ".icc")
}
Post ist für Kommentare geschlossen.
Kommentare
0 Kommentare