Access recently used colors in c#

Hey there,

I’m trying to access the list of recently used colors. They are visible in the color picker’s palette but where do I find these in Rhinocommon?

Any pointers would be much appreciated.


In-between sessions, these are stored in %appdata%\McNeel\Rhinoceros\7.0\settings\settings-Scheme__Default.xml in "/settings/settings/child[@key='UI']/child[@key='Settings']/entry[@key='ColorPanelSwatches']"

I don’t think this is accessible from RhinoCommon, but I may be mistaken.


Thanks @menno! I can easily parse this file for the information I need!

Great! Note that any changes made to the recently accessed colors during a Rhino session are not saved into that file until Rhino is shut down.

My initial tests show otherwise. It seems that each time the color picker is used, this xml file is overwritten and reflects the most recent user choices.

1 Like

Ok, perfect, I thought I had seen otherwise.

@curtisw suggested this solution using Rhinocommon outside of this thread:

var recentlyUsedColors = PersistentSettings.FromPlugInId(RhinoApp.CurrentRhinoId)?.AddChild("UI")?.AddChild("Settings")?.GetStringList("ColorPanelSwatches", new string[0]);

1 Like