Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 04-07-2016, 06:25 AM   #1
inspired
Human being with feelings
 
inspired's Avatar
 
Join Date: Dec 2010
Posts: 271
Default Negative? color values in .ReaperTheme files (SOLVED)

(found in 5.17)
Unpacking the default theme and inspecting the .ReaperTheme file, there are some strange negative values there.

For example col_main_bg=-2134917189
what's up with that?

Also if tweaking from the theme tweak window for example the "Window edit background" color and setting it to R,G,B=255,0,0 it results in "col_main_editbk=255"

However if tweaking the "Window background" color to the same color it results in "col_main_bg=-2147483393"

Last edited by inspired; 04-07-2016 at 06:35 AM.
inspired is offline   Reply With Quote
Old 04-07-2016, 06:34 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,739
Default

It is the signed representation of the regular value with the high bit set, if that helps any..
Justin is online now   Reply With Quote
Old 04-07-2016, 06:48 AM   #3
inspired
Human being with feelings
 
inspired's Avatar
 
Join Date: Dec 2010
Posts: 271
Default

Quote:
Originally Posted by Justin View Post
It is the signed representation of the regular value with the high bit set, if that helps any..
If i set this color in a reascript though, say in gfx.clear, it's not appearing as it should (keeping the minus).
Also i don't understand the inconsistency, why some colors get a minus while others not, for the same color set through the theme tweak window.
inspired is offline   Reply With Quote
Old 04-07-2016, 07:22 AM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,739
Default

Quote:
Originally Posted by inspired View Post
If i set this color in a reascript though, say in gfx.clear, it's not appearing as it should (keeping the minus).
Also i don't understand the inconsistency, why some colors get a minus while others not, for the same color set through the theme tweak window.
The colors that are optional (like the main bg config, which can be disabled to use the default system colors) have the high bit set to mark them as "valid".

In the case of these negative values, you can remove the high bit by adding 2147483648 to it.
Justin is online now   Reply With Quote
Old 04-07-2016, 11:35 AM   #5
inspired
Human being with feelings
 
inspired's Avatar
 
Join Date: Dec 2010
Posts: 271
Default

Quote:
Originally Posted by Justin View Post
The colors that are optional (like the main bg config, which can be disabled to use the default system colors) have the high bit set to mark them as "valid".

In the case of these negative values, you can remove the high bit by adding 2147483648 to it.
ha, got it! Thanks for this instant customer support xD
inspired 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 01:49 PM.


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