Go Back   Cockos Incorporated Forums > Projects > Deprecated REAPER issue tracker > Open Bug

Track Color Int on Mac is wrong Issue Tools
issueid=5615 07-11-2015 01:45 AM
Human being with feelings
Track Color Int on Mac is wrong
Track color int in ReaScript has red and blue channel inverted

Hi !

RESUME: Color int returned by reaper.GetMediaTrackInfo_Value(track, "I_CUSTOMCOLOR") is wrong on mac. Only tested in Lua.

We experienced a strange bug with Heda, when passing a GFX script that use track color (int to rgb) as gfx.color variable

I tested a simple script that return different color int value, on windows and on mac.

The script:
Code:
item = reaper.GetMediaItem(0, 0)
take = reaper.GetActiveTake(item, 0)
track = reaper.GetTrack (0, 0)

item_color_int = reaper.GetMediaItemInfo_Value(item, "I_CUSTOMCOLOR")
take_color_int = reaper.GetMediaItemTakeInfo_Value(take, "I_CUSTOMCOLOR")
track_color_int = reaper.GetMediaTrackInfo_Value(track, "I_CUSTOMCOLOR")

take_color_int_displayed = reaper.GetDisplayedMediaItemColor2(item, take)

function Msg(value)
    reaper.ShowConsoleMsg(tostring(value).."\n")
end

Msg("Item INT color: "..item_color_int)
Msg("Take INT color: "..take_color_int)
Msg("Track INT color: "..track_color_int)
Msg("Take INT displayed color: "..take_color_int_displayed)
On windows, it displayed:
Item INT color: 16777429.0
Take INT color: 16777429.0
Track INT color: 30784000.0
Take INT displayed color: 16777429

On mac (same project):
Item INT color: 16777429.0
Take INT color: 16777429.0
Track INT color: 16825045.0
Take INT displayed color: 16777429

As you can see, track Int color is different.
Deeper test reveals that this is an inversion of R and B channel.

Windows:
Quote:
track_color_r = 213
track_color_v = 186
track_color_b = 0
Mac:


To reproduce:

  1. create a project
  2. insert one track, color it
  3. insert one midi item, color it
  4. run the script
  5. compare results.

You can also use this test project and report your console messages: https://www.dropbox.com/s/0i3f4weckm...itled.RPP?dl=0

I didn't test it with other int color than these one. I only tested with Lua.

I wonder if it could also explained why my color palette are shifted when I used them on mac.


As this involves having a mac AND a pc, I don't know if there would be a lot of tester. But the bug is there, without any doubt.

Discussion: Track Color Int on Mac is wrong
Issue Details
Issue Type Open Bug
Project Deprecated REAPER issue tracker
Category Plugins
Status Unconfirmed
Priority 5 - Medium
Affected Version 4.78
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

Reply

Issue Tools
Subscribe to this issue

All times are GMT -7. The time now is 11:50 PM.


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