Old 12-19-2019, 07:13 AM   #1
synkrotron
Human being with feelings
 
synkrotron's Avatar
 
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
Default Another method of changing Track Colour

Hi Peeps

I have been inspired to have a quick dip into some very basic LUA script to change the colour of a selected track.

Normally I would have to select a track, or number of tracks and then choose "Set tracks to custom color..." from one of the pull down menus. Or I could have created a custom button to call the associated action.

That would open up the colour picker dialogue box:-



The problem I have had with this over the years is I would forget to place a custom colour into a slot so that I could use it again in the future for other tracks. Even if I did remember to store a custom colour, there are only sixteen slots available for that purpose. And it requires quite a few clicks.

On the positive side, this method allows you to change the colour of all tracks currently selected. The method I am now using only allows you to change the colour of one track at a time. But that doesn't bother me really as I tend to only colour one track at a time anyway as I build the project.


My method is based on using custom scripts and calling them from a custom toolbar that has a total of 18 of my preferred colours, plus a button which calls the "Track - Set to default color" action. Each button icon image is coloured the same as the colour that is used to set the selected track to.

Here is what my toolbar looks like:-



and I also created one for setting the colour of my divider tracks:-





This is so simple (once I got my head around stuff) that I am sure this has been done already



cheers

andy
__________________
Bandcamp // YouTube // SoundCloud
synkrotron is offline   Reply With Quote
Old 12-19-2019, 07:20 AM   #2
synkrotron
Human being with feelings
 
synkrotron's Avatar
 
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
Default

Quote:
Originally Posted by synkrotron View Post
And it requires quite a few clicks
Actually, having double checked, that statement is a load of bollocks.

Same number of clicks. But for some reason it just feels quicker. Probably because I am limiting my colour choices...
__________________
Bandcamp // YouTube // SoundCloud
synkrotron is offline   Reply With Quote
Old 01-26-2020, 03:12 AM   #3
tonybeepbeep
Human being with feelings
 
Join Date: Mar 2018
Location: Norway
Posts: 239
Default

Sympathy post

I'm actually very interested in this and would love to have a colour changer on the toolbar
tonybeepbeep is offline   Reply With Quote
Old 01-26-2020, 06:12 AM   #4
synkrotron
Human being with feelings
 
synkrotron's Avatar
 
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
Default

Quote:
Originally Posted by tonybeepbeep View Post
Sympathy post


Quote:
I'm actually very interested in this and would love to have a colour changer on the toolbar
Erm, well, in some ways it is simple, but a general faff too...

I'm a bit busy with home stuff at the moment. If you wish I could go into more detail when I get time later.

cheers

andy
__________________
Bandcamp // YouTube // SoundCloud
synkrotron is offline   Reply With Quote
Old 01-26-2020, 06:31 AM   #5
tonybeepbeep
Human being with feelings
 
Join Date: Mar 2018
Location: Norway
Posts: 239
Default

Quote:
Originally Posted by synkrotron View Post




Erm, well, in some ways it is simple, but a general faff too...

I'm a bit busy with home stuff at the moment. If you wish I could go into more detail when I get time later.

cheers

andy
Deffo, as you're the best thing to come out of Warrington since Ian Brown and the A57
tonybeepbeep is offline   Reply With Quote
Old 01-26-2020, 06:38 AM   #6
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 982
Default

This is a great tip. I keep my coloring scripts in the main toolbar.


This has eliminated the need for SWS autocoloring for me. There's a system to it as well, where stringed instruments are blue, percussion is yellow, FX are pink, etc. I think it's useful in order to keep large projects tidy.
__________________
Mordi is offline   Reply With Quote
Old 01-26-2020, 03:49 PM   #7
dug dog
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,798
Default

There's a way to add a colour palette to the right click menu. You can do multiple tracks at once, too, so it's pretty slick. Unfortunately, I can't remember how it was done or who I got the script/tip/hack from.

A quick search has proved fruitless. Must go make dinner.
dug dog is offline   Reply With Quote
Old 01-26-2020, 04:12 PM   #8
Keepitsimple
Human being with feelings
 
Join Date: Oct 2019
Posts: 11
Default

Quote:
Originally Posted by dug dog View Post
There's a way to add a colour palette to the right click menu. You can do multiple tracks at once, too, so it's pretty slick. Unfortunately, I can't remember how it was done or who I got the script/tip/hack from.

A quick search has proved fruitless. Must go make dinner.
Options----> Customize Menu/toolbars----> Track Panel Context-----> add action "Script: Airon_Colour Swatch.lua"----> Rename action to "colors" or whatever you prefer.

That's what i do
Keepitsimple is offline   Reply With Quote
Old 01-26-2020, 05:12 PM   #9
dug dog
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,798
Default

Much obliged.
dug dog is offline   Reply With Quote
Old 01-27-2020, 02:28 AM   #10
synkrotron
Human being with feelings
 
synkrotron's Avatar
 
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
Default

Quote:
Originally Posted by Keepitsimple View Post
"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
__________________
Bandcamp // YouTube // SoundCloud
synkrotron is offline   Reply With Quote
Old 01-27-2020, 02:31 AM   #11
synkrotron
Human being with feelings
 
synkrotron's Avatar
 
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
Default

Quote:
Originally Posted by tonybeepbeep View Post
Deffo, as you're the best thing to come out of Warrington since Ian Brown and the A57
I forgot that Ian Brown was from Warrington.

And I'm three years older than him so he is the "best thing to come out of Warrington" since me haha


A49 is a much nicer road, for bikers...
__________________
Bandcamp // YouTube // SoundCloud
synkrotron is offline   Reply With Quote
Old 01-27-2020, 02:33 AM   #12
synkrotron
Human being with feelings
 
synkrotron's Avatar
 
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
Default

Nice, @Mordi

Quote:
Originally Posted by Mordi View Post
This has eliminated the need for SWS autocoloring for me.
I'm not a fan of SWS. I am happy with REAPER as it comes out of the box and getting to learn an "add in" is just another faff that I don't need.

And I certainly don't like auto colouring.
__________________
Bandcamp // YouTube // SoundCloud
synkrotron is offline   Reply With Quote
Old 01-27-2020, 08:18 AM   #13
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 982
Default

Quote:
Originally Posted by synkrotron View Post
I'm not a fan of SWS. I am happy with REAPER as it comes out of the box and getting to learn an "add in" is just another faff that I don't need.
Can relate - I was in the same boat, but I think it was the loudness analyzer that brought me on board. Really nifty!
__________________
Mordi is offline   Reply With Quote
Old 01-27-2020, 09:00 AM   #14
b0se
Human being with feelings
 
b0se's Avatar
 
Join Date: Jan 2019
Location: UK
Posts: 938
Default

Quote:
Originally Posted by Mordi View Post
Can relate - I was in the same boat, but I think it was the loudness analyzer that brought me on board. Really nifty!
I use that all the time too

SWS Region Playlists are cool too.
__________________
Smooth V6 1080P/HiDPI Theme
b0se is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.