6#include "../datatypes/rgba32.hpp"
7#include "../result.hpp"
20 using UInt32Builder = NumericBuilder<UInt32Type>;
35 Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) : rgba(r, g, b, a) {}
63 Color(uint32_t rgba_) : rgba(rgba_) {}
65 Color& operator=(uint32_t rgba_) {
83 struct Loggable<components::Color> {
84 static constexpr const char Name[] =
"rerun.components.Color";
87 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
91 arrow::UInt32Builder* builder,
const components::Color* elements,
size_t num_elements
95 static Result<std::shared_ptr<arrow::Array>> to_arrow(
96 const components::Color* instances,
size_t num_instances
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:87
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:69
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Component: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
Definition color.hpp:28
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Construct Color from unmultiplied RGBA values.
Definition color.hpp:35
Datatype: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
Definition rgba32.hpp:27