Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Color Themes and Icon Sets

Reply
 
Thread Tools Display Modes
Old 01-08-2018, 05:03 PM   #1
theFRXST
Human being with feelings
 
theFRXST's Avatar
 
Join Date: Mar 2017
Posts: 132
Default Text color change depending on track color (SOLVED)

I noticed in the default theme the track numbers will change from white to black depending on color.

I attempted to copy some of of the walter code out of it into my own with no luck.

Someone thats a better walter wizard than myself know how do to this?
__________________
thefrxst.com

Last edited by theFRXST; 01-09-2018 at 07:39 PM.
theFRXST is offline   Reply With Quote
Old 01-08-2018, 05:18 PM   #2
strachupl
Human being with feelings
 
strachupl's Avatar
 
Join Date: Jan 2013
Posts: 650
Default

I think you must add in code before walter line:
version 5
to use this option:
Quote:
https://www.reaper.fm/sdk/walter/walter.php#scalars
trackcolor_valid -- (REAPER 5.0+) - set to 1 if track color set
trackcolor_r -- (REAPER 5.0+) - valid if trackcolor_valid set, red value 0-255
trackcolor_g -- (REAPER 5.0+) - valid if trackcolor_valid set, green value 0-255
trackcolor_b -- (REAPER 5.0+) - valid if trackcolor_valid set, blue value 0-255
This will make track label text color to track color:
Quote:
set tcp.label.color [trackcolor_r trackcolor_g trackcolor_b 255]
You can go advance with it:
Quote:
set modr * trackcolor_r 0.5
set modg * trackcolor_g 0.5
set modb * trackcolor_b 0.5
set tcp.label.color [modr modg modb 255]
Label text should be half bright than track color now.
__________________
Love is patient and kind; love does not envy or boast; it is not arrogant or rude.
It does not insist on its own way; it is not irritable or resentful;
it does not rejoice at wrongdoing, but rejoices with the truth. Corinthians 13:4-6
strachupl is offline   Reply With Quote
Old 01-08-2018, 06:10 PM   #3
theFRXST
Human being with feelings
 
theFRXST's Avatar
 
Join Date: Mar 2017
Posts: 132
Default

thanks for the reply, this just makes the text the color of the track. I'd like the text to turn black on a certain brightness for a color and the opposite. Hope that makes sense
__________________
thefrxst.com
theFRXST is offline   Reply With Quote
Old 01-09-2018, 03:17 PM   #4
Pet
Human being with feelings
 
Pet's Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 1,016
Default

Hi theFRXST,
that's exactly what I had to deal with too, because in my default-mod I made the backgrounds more transparent to see more of the chosen color. This was not a smart decision, cause the readout text became sometimes unreadable. You can check the rtconfig from my default-mod (it's in my signature).
I copied and modified the color-macro to change from a lighter to a darker color, depending on the brightness of the track color.
I assume, that's what you want to achieve too.
I'm not at my PC right now, so I can't look after details, but I hope, it will help you.

Peter
__________________
If the v5 Default Theme is too bright for you take a gander at my mod of it: Default v5 Dark Theme
Pet is offline   Reply With Quote
Old 01-09-2018, 07:38 PM   #5
theFRXST
Human being with feelings
 
theFRXST's Avatar
 
Join Date: Mar 2017
Posts: 132
Default

Thanks Pet, I already had that macro from the default theme.. I decided to attempt to edit the macro and well.. I have my desired result.

---

macro colorsmart element r g b
set luma + + * 0.299 [trackcolor_r] * 0.587 [trackcolor_g] * 0.114 [trackcolor_b]
set element ?trackcolor_valid luma{x}>140 [23 23 23] [214 214 214] [r g b]
endmacro

colorsmart tcp.label.color 230 230 230 0

---
__________________
thefrxst.com
theFRXST 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:35 AM.


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