Function get_rgb

Function Documentation

std::tuple<float, float, float> get_rgb(int rgb)

Converts an integer RGB value to its individual red, green, and blue components.

This function takes an integer representing an RGB color and extracts the red, green, and blue components as floating-point values in the range [0.0, 1.0].

Parameters:

rgb – An integer representing the RGB color. The format is 0xRRGGBB.

Returns:

A tuple containing the red, green, and blue components as floats.