All right, this should absolutely be part of the core documentation related to “raw” and “dot notation”. The sort() function takes 3 arguments, the first being mandatory
You must pass an array to sort so usually you will pass the output of an array or an array aggegator to perform the sort.
Ascending is the default sort order so if you leave off key 2 you will get ascending.
It is the third argument that is crucial. You cannot just cram a color pill from the result of a previous output into this key. You have to either identify the simple key name or array path (in dot notation).
This video shows you how to derive this from looking at the output bundle in JSON, which is the easiest way to identify this raw path.