It was working until ArcGIS Pro 2.7 SDK.
ArcGIS Pro SDK community sample Raster Colorizer doesn't work too.
It throws exception:
Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Colorizer.BtnNewColor.<>c__DisplayClass0_0.<OnClick>b__0() in D:\ArcGIS_SDK_Samples\arcgis-pro-sdk-community-samples-master\Raster\Colorizer\BtnNewColor.cs:line 54
It was issue with ArcGIS Pro project file. Save as didn't solve the issue. I have recreated project from scratch and now it works fine.
I have extracted both projects to files. There is CIMProjectItem record in GISProject.xml file which is related to ArcGIS Colors. In damaged project CatalogPath setting is equal to full project path + ArcGIS Colors:
In working project:
The same situation with ColorBrewer Schemes (RGB).