Quote:
Originally Posted by Keepitsimple
"Script: Airon_Colour Swatch.lua"
|
This is obviously a great script but for anyone why may be interested in "doing their own thing" this is my solution in more detail:-
Step 1 - Explore and choose colours
This is probably the most painstaking step.
There are millions of colours but you can only use a small number of colours together for them to remain distinguishable. To be honest I am not entirely happy with my choices but I have to crack on with other things.
For reference only, I currently use 32 colours in my two toolbars;
Track colours = 8 groups of three colours,
Colour RGB values,
Track 1 200 130 130
Track 2 255 150 150
Track 3 255 200 200
Track 4 130 200 130
Track 5 150 255 150
Track 6 200 255 200
Track 7 130 130 200
Track 8 150 150 255
Track 9 200 200 255
Track 10 200 200 130
Track 11 255 255 150
Track 12 255 255 200
Track 13 200 130 200
Track 14 255 150 255
Track 15 255 200 255
Track 16 130 200 200
Track 17 150 255 255
Track 18 200 255 255
Track 19 255 150 0
Track 20 255 190 0
Track 21 255 210 0
Track 22 150 70 0
Track 23 180 80 0
Track 24 210 90 0
Divider colours = 8 colours, which are supposed to be stronger versions of the 8 track group colours,
Colour RGB values,
Divider 1 255 90 90
Divider 2 90 255 90
Divider 3 90 90 255
Divider 4 255 255 90
Divider 5 255 90 255
Divider 6 90 255 255
Divider 7 255 100 0
Divider 8 130 50 0
Step 2 - Create a button icon for each track and divider colour
This is a simple toolbar icon that uses the exact colour that it is suppose to select when clicked. For example, this is the button for track colour 1:-
Step 3 - Create a separate script for each track and divider colour
With some searching around the REAPER scripts forum I was able to knock up a very simple script that changes the colour of the selected track, be it a normal track or divider.
This is the script for Divider Colour 1, which is called "ColourDivider01.lua":-
Code:
function changecolour()
tr = reaper.GetSelectedTrack(0, 0)
color = reaper.ColorToNative(255,90,90)
reaper.SetTrackColor(tr, color)
end
pcall (changecolour)
I am sure that it is possible to create one single script with all the necessary functions contained within. But once I had got this far I left it at that. I may return to this in the future in order to optimise the process.
Step 4 - Add Track and Divider colour scripts to REAPER
This is done by opening the Actions list, clicking on the Load... button in the bottom right corner and select all 32 scripts.
Step 5 - Edit existing toolbars in REAPER
I do a number of things here.
a) I add two buttons to my main toolbar. One show the Track Colour toolbar and the other shows the Divider toolbar:-
The two buttons at bottom right are the new buttons for calling up the Track Colour and Divider Colour dialogue boxes. As you can see I struggled to come up with an image to represent what I wanted the buttons to do but, because there are only two you quickly get to know which is which.
b) Next I opened up the Toolbar Docker from the View menu and used Toolbar 1 for Track Colour and Toolbar 2 for Divider Colour.
Selecting an empty toolbar presents you with a single button that, when clicked, brings up the Customise menus/toolbars dialogue box. Clicking on Add... brings up the Actions list. So now create all the new Track and Divider Colour buttons by selecting the required action and selecting the associated icon.
In my example above I use "separators" in the Track Colour toolbar in order to give the impression that the colours are in distinct groups.
I think that's it.
If any of the above falls short somehow then please ask me to elaborate on any of the steps listed.
Good luck
cheers
andy