Studio 2.0 and the Favorite colors palette

Studio 2.0 and the Favorite colors palette

Modifying the Windows registry to setup the palette of Favorite colors just as I want it.

I’m trying to switch which LEGO CAD application I use from LEGO Digital Designer (LDD) to Bricklink’s Studio. Studio feels like the future, it has newer pieces and gets updated more regularly. But I’m having some troubles getting adjusted to it. It is hard to use Studio when you constantly feel you would get the work done faster in LDD.

One of my issues is with the color selection. Studio has a greater selection of colors, which I get is a plus for many people, but not for me. Many of the colors I’ll probably never use and they just make it harder for me to find the ones I want. Thankfully the developers thought about that and added a way to build up a palette of ones favorite colors. A palette that I can add to every time I use a color for the first time.

Not good enough :/

But my the issue with that feature is that I can’t rearrange the colors as the palette grows. I would like to have a palette with an order that feels logical or is familiar to me, like the palette in LDD. Also I need the palette to look the same regardless of which computer I’m using. (Currently I have Studio installed on three different computers.)

I know that I could manually go through all the colors in Studio and add colors to the favorite palette in the order I want, but that’s boring and tedious. Especially if I need to do it on every computer where I have Studio installed. The hacker in me would much rather use this as an opportunity to learn about how Studio works under the hood. So that is what I did.

The investigation

I started with looking through the contents in %ProgramFiles%\Studio 2.0\ and %LocalAppData%\Stud.io. I didn’t find anything that looked like it had something to do with the favorite palette, but I did notice a file that could be helpful later on: %ProgramFiles%\Studio 2.0\data\StudioColorDefinition.txt

StudioColorDefinition.txt viewed in Excel to make it easier to see the column

It contains names, ID:s and other information that could be useful for this and future adventures.

Next I looked through the Windows Registry. By just searching for “Studio” I found the following Key path: HKEY_CURRENT_USER\Software\BrickLink\Studio. It included a key value with the name “ColorPalette_h240037” that looked promising.

The data for ColorPalette_h240037

The data is a string of numbers separated with commas. By looking in the earlier mentioned file, StudioColorDefinition.txt, I could confirm that the numbers were LDraw codes for the colors in my current palette. I could further confirm it was for the favorites palette by changing the values to different color codes and see them appear as favorites when starting up Studio.

So now we know where and how the palette for the favorite colors is stored!

Side note: The weird ending, h240037, on the value name got me a bit worried at first. I thought that maybe the names would be computer specific. But after looking in the registry on a second computer I could see that they were the same. Still curious, I did some googling to see if I could find a reason for the name format and found out that Unity (which Studio is made with) adds a hash value to all [Player Preferences](Unity: https://docs.unity3d.com/ScriptReference/PlayerPrefs.html) names for some unknown reason.

Making it easy to setup the Favorite palette

Knowing that the palette was in the Windows Registry, I decided that the easiest way to configure it on several machines, the way I wanted it, would be to create a simple text file that could be used to update the Registry.

The LDD palette

I went through the LDD palette and made a list with all the LDraw Color codes in the order I wanted them. Again the StudioColorDefinition.txt file was useful. It helped me to find the LDraw codes for all the LDD colors. I went with all Solid, Transparent and Metallic colors in the same order as in LDD. I skipped all Legacy colors, except for “Bright bluish green”/“Dark Turquoise” which has made a comeback. I added it right after “Aqua”/“Light Aqua”.

The resulting list looked like this:

32,72,71,151,15,320,4,308,70,330,28,19,484,92,84,25,191,78,14,226,10001,288,378,2,10,27,326,321,322,272,1,73,379,212,323,3,85,26,30,31,5,29,47,36,35,37,40,294,33,43,52,34,57,46,38,42,41,87,179,383,297,334

Luckily Studio doesn’t care if we change the value type from REG_BINARY to REG_SZ so we don’t need to mess with Hex values. We can use the list as it is above. (Studio will rewrite the values as REG_BINARY once it is close down again.)

So all I needed to do once I had my list is to create a file with the following content and import it into the Windows Registry. The importing is easiest done by saving the file with the file ending “.reg” and then double clicking it.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\BrickLink\Studio]
"ColorPalette_h240037"="32,72,71,151,15,320,4,308,70,330,28,19,484,92,84,25,191,78,14,226,10001,288,378,2,10,27,326,321,322,272,1,73,379,212,323,3,85,26,30,31,5,29,47,36,35,37,40,294,33,43,52,34,57,46,38,42,41,87,179,383,297,334"

Success! Now I have a nice little file that I can reuse any time I need to setup the palette just as I want it.

About the Windows Registry / Disclaimer

I’m intentionally been a bit vague about what the Windows Registry is and how to edit it. That because I don’t want anyone unfamiliar with the Registry to start editing it. Please learn a bit about it before you try to recreate what I did. Especially learn how to create backups before you try to change anything. You can mess up important parts of Windows if you accidentally edit the wrong thing.

Recreate my actions at your own risk.