Skip to content

Incorrect Transparent default in Color Schema #1948

@ThomasWilshaw

Description

@ThomasWilshaw

I was looking through the new color schema code and noticed a slight issue. The Transparent preset is listed as (1.0, 1.0, 1.0, 0.0) when it should be (0.0, 0.0, 0.0, 0.0). Alpha encodes occlusion and RGB encodes emission. (1.0, 1.0, 1.0, 0.0) is full emission and no occlusion (think candle flame) whereas a fully transparent pixel would be (0.0, 0.0, 0.0, 0.0), i.e. no emission and no occlusion.

https://github.com/AcademySoftwareFoundation/OpenTimelineIO/blob/main/src/opentimelineio/color.cpp#L40

I appreciate this schema is only meant for use on UI elements but who knows where that could go in the future and having properly encoded emission and occlusion could save all manner of headaches further down the line. Even something as simple as a blurred edge to a UI element could go wrong if the alpha is not correctly encoded.

Right is the original image and left is (1.0, 1.0, 1.0, 0.0) composited over it, definitely not transparent.

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions