The focus need to be displayed on those saved colors.
When adding to the custom colors the first item is what gets saved. This is tricky because if the user builds a color then selects which custom block to save the build parameters are lost and the newly selected block color takes precidence.
Please use a image to show exactly you are talking about. It's not clear to me just reading the comment. Sorry.
p.s. this thread is specifically dedicated to the v2.2.*, so you don't need to add the version to the subject.
Better now.
This is a dialog from the OS and we don't handle it except by filling the Custom palette with a gray-scale pattern (but, the system will handle it as soon as the user defines a new one).
When the previous color is present in one of those palette (System and Custom), then the proper color slot will be focused.
If it's not present, then the first color slot (top-left) will be focused and the slider (at right) will be pointing to that color setting. You can change the color and hit OK, but if you hit
"Add to custom colors" then the first color slot in the custom palette will be overridden.
If you want to create your own custom color palette, you must first select a custom color slot and then chose the color on the color picker or slider and then hit
"Add to custom colors".
And you can use wings color chooser first and still use the OS color chooser when needed when pressing top-left color in wings color chooser.