NSColorPanel: Control selection and order of NSColorLists

Hi folks,

In my macOS app I’m using NSColorPanel to present color picking options to the user. Therefore I’m attaching various custom NSColorLists before showing the color panel. The panel is always presented with the „Apple“ color list active, and I found no method to select a different color list. In my app I could determine the most relevant color list and would like to preselect it instead of relying on a manual selection by the user.

Is there any option to control the selected / active NSColorList of an NSColorPanel?

Additionally - but that more a minor topic and probably a candidate for a bug report: Since some major macOS versions (maybe starting with macOS 13 „Ventura“?) the order of NSColorLists in the default NSColorPanel is random. In the past color palettes were listed in reverse order of their attachments via „attachColorList:“.

Is there any way to control the order color palettes are listed by an NSColorPanel

I just spent one of my TSIs for this question - as my Apple developer membership is renewed shortly - but maybe this community as some smart tip to share...

Appreciate any help, Mattes

Answered by MyMattes in 779940022

Apple DTS has confirmed that there is no supported way to programmatically set the active NSColorList in an NSColorPanel. The sort order of color lists will be further addressed following my bug report - I won't hold my breath. The TSI has been refunded...

FYI, the issue of NSColorLists being randomly ordered in NSColorPanel was already reported as an issue in October 2023 (FB13311179), still open and uncommented.

Accepted Answer

Apple DTS has confirmed that there is no supported way to programmatically set the active NSColorList in an NSColorPanel. The sort order of color lists will be further addressed following my bug report - I won't hold my breath. The TSI has been refunded...

NSColorPanel: Control selection and order of NSColorLists
 
 
Q