Old 03-04-2016, 01:00 PM   #1
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default REAPER colors on OSX vs Windows - Why?

What is the difference between the way colours are encoded in REAPER on Windows vs OSX?

I've been colouring items blue by setting a number in the RPP, but now testing if this works on Windows, I get red items, not blue!

This is the same project first encoded on a mac, then moved to a windows machine. It swaps reds & blues for some bizarre reason.

Mac OS X



Windows 7

__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 03-04-2016, 02:55 PM   #2
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
Default

I faced the same problem with my colour swatch window script (Lua). At least I hope it's the same problem.

Heda sent me the fix that Jeffos of Cockos had implemented to get this right:

http://forum.cockos.com/showpost.php...&postcount=176

Quote:
Originally Posted by heda View Post
around line 504 replace
set_colour = int_r + int_g*256 + int_b*65536 -- integer
with

Code:
set_colour = reaper.ColorToNative(int_r, int_g, int_b)
and line 526
item_colour = int_r + int_g*256 + int_b*65536
with
Code:
item_colour = reaper.ColorToNative(int_r, int_g, int_b)
that might work. But I don't have OSX. Try it.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 03-04-2016, 02:59 PM   #3
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default

My guess is they have accidentally swapped red and blue channels between platforms.

Green seems to be unaffected.

Also for my purposes (writing in the RPP), unless I add another number to the 3 channels, it comes out transparent!

I can't use the REAPER APIs as this is not a script, it is an external app modifying the RPP to change the colours.

I will see what happens tomorrow if I just find out what platform is then and then swap red and blue accordingly. May work?
__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 03-04-2016, 03:04 PM   #4
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,269
Default

I thought it was only affecting the way REAPER interpreted the colours from the scripts, but if you open a project in different platforms, and they change colours, I consider it a bug. It shouldn't happen. A red track must always be a red track.
heda is offline   Reply With Quote
Old 03-04-2016, 03:09 PM   #5
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default

Yes it seems like the sort of simple oversight bug that is so easy to make when writing software. Especially as you don't often switch platform quickly.

However, now it is there, fixing it will also swap red & blue back for existing projects.

So what to do?

Fixing it will change the colours of everyone's current projects (but newly started projects will be fine)
__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 03-04-2016, 06:41 PM   #6
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

improving the software is more important
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 03-05-2016, 02:30 AM   #7
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default

I've just realised, I can't work around this like I thought yesterday, simply by using different number encoding if run on Mac vs Win.

The nature of my software is that it may be run by one person on a Mac (i.e. using FCPX) in order to create and send a REAPER project to someone using REAPER on Windows. It is a workflow tool. People may be on different platforms.

The colours need to be the same in this scenario.
__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 03-05-2016, 03:06 AM   #8
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
Default

Then it is necessary to report this as a bug.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 03-05-2016, 03:14 AM   #9
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default

Quote:
Originally Posted by airon View Post
Then it is necessary to report this as a bug.
Done

http://forum.cockos.com/showthread.php?p=1648222
__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 03-05-2016, 03:13 PM   #10
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default

Yay!

Getting fixed.

http://forum.cockos.com/showthread.p...90#post1648490
__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 03-05-2016, 03:23 PM   #11
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,746
Default

Quote:
Originally Posted by mrlimbic View Post
Fixing it will change the colours of everyone's current projects (but newly started projects will be fine)
For the fix, we're making it so that:

+ Projects saved with 5.16 and earlier on OSX/Windows will look the same when loaded on the same platform.
+ Projects saved with a version after 5.16 will look the same when loaded on any platform and a version after 5.16.
+ Projects saved with a version after 5.16 will look the same when loaded on the same platform and an older version of REAPER.

Hope this helps!
Justin is offline   Reply With Quote
Old 03-07-2016, 12:32 PM   #12
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default

Quote:
Originally Posted by Justin View Post
For the fix, we're making it so that:

+ Projects saved with 5.16 and earlier on OSX/Windows will look the same when loaded on the same platform.
+ Projects saved with a version after 5.16 will look the same when loaded on any platform and a version after 5.16.
+ Projects saved with a version after 5.16 will look the same when loaded on the same platform and an older version of REAPER.

Hope this helps!
Yes it does a lot! Thanks Justin.

Any idea how long? I was about to release something that is affected by this but may hold off a bit more.

In the meantime, what colour number scheme should I be using when writing an RPP? I've been using the numbers below which produces correct colours on a Mac.

Code:
GREEN = 0x0100aa00;
BLUE = 0x010000aa;
YELLOW = 0x01aaaa00;
ORANGE = 0x10055aa;
RED = 0x01aa0000;
PURPLE = 0x01aa00aa;
__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 04-29-2016, 11:41 AM   #13
ned
Human being with feelings
 
Join Date: Mar 2012
Posts: 331
Default

Can anyone else confirm that regions and markers have the same red/blue value swapping issue as above? Tested on portable windows install of 5.18 and the exported regions/markers csv has red and blue values swapped. Red (255,0,0) csv export value reads as 0000FF and should be FF0000, while blue (0,0,255) reads as FF0000 and should be 0000FF.
Code:
#,Name,Start,End,Length,Color
R1,red - 255 0 0,3.1.00,5.1.00,2.0.00,0000FF
R2,blue 0 0 255,5.3.00,6.4.00,1.1.00,FF0000
On a side note, does anyone know the encoding type/formatting for color values in the rpp state chunks? Red/blue color values across tracks, items and regions/markers all seem to match, but I was expecting the regions/marker red/blue values to also be swapped in the rpp. Don't know what the number strings represent, so no way for me to compare to the values in the csv file.

Thanks for any help.
Attached Files
File Type: rpp region_marker_color_test-5_18.RPP (3.2 KB, 279 views)
ned is offline   Reply With Quote
Old 05-07-2016, 05:26 AM   #14
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 669
Default

Quote:
Originally Posted by Justin View Post
For the fix, we're making it so that:

+ Projects saved with 5.16 and earlier on OSX/Windows will look the same when loaded on the same platform.
+ Projects saved with a version after 5.16 will look the same when loaded on any platform and a version after 5.16.
+ Projects saved with a version after 5.16 will look the same when loaded on the same platform and an older version of REAPER.

Hope this helps!
Justin, are you sure this was fixed in 5.17? I have just been dealing with a Windows user and noticed that the colors set in the RPP using the constants I showed above are still reversed compared to on my Mac.
__________________
Vordio - Post Production Toolkit
http://vordio.net
mrlimbic is offline   Reply With Quote
Old 04-15-2023, 07:49 PM   #15
Mortarion
Human being with feelings
 
Join Date: Apr 2023
Posts: 6
Default

Hi, are there any news about repairing this issue? Now, I'm in the process of moving to the different system. And I'm terrified that all my 300 positions of the auto-coloring will need to be redone manually.

Maybe anybody already found a quick solution for this?


Quote:
Originally Posted by Justin View Post
For the fix, we're making it so that:

+ Projects saved with 5.16 and earlier on OSX/Windows will look the same when loaded on the same platform.
+ Projects saved with a version after 5.16 will look the same when loaded on any platform and a version after 5.16.
+ Projects saved with a version after 5.16 will look the same when loaded on the same platform and an older version of REAPER.

Hope this helps!
Mortarion is offline   Reply With Quote
Old 12-12-2023, 11:18 AM   #16
lorenzo.gavanna
Human being with feelings
 
Join Date: Jan 2022
Posts: 18
Default

Hi Justin, thank you for your hard work! Is there any chance to get this fixed?
Because apparently there are differences in OSX/Windows coloring even with 7.06
Quote:
Originally Posted by Justin View Post
For the fix, we're making it so that:

+ Projects saved with 5.16 and earlier on OSX/Windows will look the same when loaded on the same platform.
+ Projects saved with a version after 5.16 will look the same when loaded on any platform and a version after 5.16.
+ Projects saved with a version after 5.16 will look the same when loaded on the same platform and an older version of REAPER.

Hope this helps!
lorenzo.gavanna 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 05:47 PM.


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