MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / GetColorHex

Method GetColorHex

src/Color.cpp:47–55  ·  view source on GitHub ↗

Get the HEX value of a color at a specific frame

Source from the content-addressed store, hash-verified

45
46// Get the HEX value of a color at a specific frame
47std::string Color::GetColorHex(int64_t frame_number) {
48
49 int r = red.GetInt(frame_number);
50 int g = green.GetInt(frame_number);
51 int b = blue.GetInt(frame_number);
52 int a = alpha.GetInt(frame_number);
53
54 return QColor( r,g,b,a ).name().toStdString();
55}
56
57// Get RGBA values for a specific frame as an integer vector
58std::vector<int> Color::GetColorRGBA(int64_t frame_number) {

Callers 5

GetFrameMethod · 0.80
GetFrameMethod · 0.80
GetFrameMethod · 0.80
Caption.cppFile · 0.80
Color.cppFile · 0.80

Calls 1

GetIntMethod · 0.80

Tested by

no test coverage detected