-
Notifications
You must be signed in to change notification settings - Fork 299
Marker RGB colors #1873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See also this code which attempts to map between RGB and named colors when reading an AAF: https://github.com/OpenTimelineIO/otio-aaf-adapter/blob/main/src/otio_aaf_adapter/adapters/advanced_authoring_format.py#L208
|
See also this other use of colors for tracks and clips: #1614 |
And also this document which details how FCP 7 XML and Premiere Pro store colors: https://github.com/AcademySoftwareFoundation/OpenTimelineIO/wiki/Editorial-File-Format-Notes |
In another forum I mentioned sticking to color interop forum colorspaces, but I support restricting user interface element colors to sRGB. |
Curious what happens in applications that store RGB in files when you use colors that aren't in their set of selectable colors - we should try this out to see what happens. Here's how I've been mapping colors from Premiere and FCP 7 based on the names in the UIs: """ This is a mapping of ppro colors to named colors. """
PPRO_COLOR_MAP = {
# ppro color values are the int of their 8-bit per channle ABGR values.
0xFF863771: "GREEN",
0xFF2C36D2: "RED",
0xFF8BB1AF: "PINK",
0xFF246FE9: "ORANGE",
0xFF2BA1D0: "YELLOW",
0xFFFFFFFF: "WHITE",
0xFFFC8D42: "BLUE",
0xFFB18BAF: "PURPLE",
0xFFD6F419: "TURQUOISE",
}
FCP7_COLOR_MAP = {
(255, 0, 0): "RED",
(255, 127, 0): "ORANGE",
(255, 255, 0): "YELLOW",
(48, 191, 72): "GREEN",
(48, 191, 191): "TURQUOISE",
(0, 128, 255): "BLUE",
(127, 0, 255): "PURPLE",
(255, 0, 127): "PINK",
} |
OTIO Markers have a "color" attribute which is a string taken from a list of color names ("RED", "GREEN", "YELLOW", etc.) However, some systems specify named colors that are not in this list, or allow arbitrary RGB values. In order to support a wider set of marker colors, we could switch OTIO to use an RGB triple like
(255, 127, 0)
or(1.0, 0.5, 0.0)
and include helper functions to convert to and from lists of color names.See prior work & discussion here: #27
To limit the scope of this a bit, let us assert that markers never have a transparency/alpha, and that marker colors are not managed through colorspaces (sRGB, etc.). If anyone can show a counter example in an existing application, format, or workflow, please post it here.
The text was updated successfully, but these errors were encountered: