Quite a while ago I did this pile of ReaScripts that deal with custom colors on tracks and items. I always wanted to upload them, but never got around to it.
I finally packed a bunch of them for you to enjoy. The coding is - to put it lightly - clumsy at best (even for my humble standards
), but they do the job as intended.
There are no scripts dealing with take color in this pack, because down the road I changed the approach to it, to avoid the action flood. More on that at the end of this post.
Most of them are scripts to increase or decrease either hue, brightness or saturation of the selected track or item colors, so you can dial in existing colors by making it brighter/darker or cycle it around the color wheel or change saturation without going into the color picker dialog. You can also have a bunch of differently colored tracks or items and, say, desaturate them a tad all in one go.
Track as well as item color scripts include:
- brightness increase and decrease
- saturation increase and decrease
- hue increase and decrease (rather: cycle forward/backwards through the color wheel) plus versions with a wider step size (coarse)
- copy color of first selected track (item) to clipboard
- paste color from clipboard to all selected tracks (items)
The copy/paste scripts share a common clipboard, so you can copy a track color and paste it on items and vice versa
For track colors there are a few additional scripts to give a bunch of selected tracks individual colors:
- "Track color brightness darker decrease multitrack.py" looks at the color of the first selected track and gives all other selected tracks a relative color, getting a tad darker on each subsequent track. There is a coarser version (wider steps) of that one also. Useful (and looking fancy) on folders.
- "Track color hue rainbow" does a similar thing but with the hue aspect.
- "Track color hue shuffle" is the same as the above with wider step size
Most of the track color scripts (except copy to clipboard) will init the color to a medium red-ish color if no custom track color is set.
Item color scripts will first look whether they find a custom item color, if not then look for a custom track color. If neither is found they also init to a medium red-ish (IIRC, that is...).
All of the increase/decrease scripts cycle when a certain extreme value is reached. Eg, if you go darker, at a certain value it will start over from "pretty bright". The resulting jump can look a bit weird in case of brightness and saturation, but I figured it's the best I could do when the extremes are reached.
Here is a teaser screencap I did back then, showing some of them in action. Quoting myself from the thread back then:
Quote:
Originally Posted by gofer
At the start I select all folder parents and use the "hue shuffler" script to give each a "random" color (SWS autocolor does the neat live coloring of child tracks). Then I use the "get darker" script to sweeten the children tracks up (this would work as well without SWS pre-coloring, it only depends on the first selected track). Afterwards I just toy around changing various color aspects on track 5.
Boy, how I want to make them ready for prime time
|
This capture was made before Cockos provided a much nicer API to track colors. The scripts run a lot faster than that now
grab and enjoy:
https://stash.reaper.fm/v/14535/gofer...%20scripts.zip
As said, the code is really noobish but as they work fine I probably just leave them as that. But still, if someone has a more direct conversion from Reaper's color numbers to HSV values and back, I'd like to know. The stuff I found back then sort of travels from Rome to Paris via Capetown and Sidney
.
Also, I have a lot of these functions as scripts that work on either track, item or take color, depending on a state which can be set via another set of actions. I use them on a color toolbar, but setting it up is a bit more involved and due to Reaper's toolbar not playing nice with 3-way-toggling it's also not totally perfect if you really want to have access to all 3 target types from the toolbar. If there is some interest I could probably find some spare time to pack them as well (and come up with a description about ways to make it work - which is the part I hate about it
).