miniRT
By Marcelo Magalhães and Ygor G. Sena, 2023.
s_color Struct Reference

The struct s_color stores the color values of ray tracing. It contains a field for red, green and blue values. If all components are 1, the final color is white. Otherwise, if all of them are 0, the resulting color is black. Therefore, each field has a range between 0 and 1. More...

#include <tuples.h>

Data Fields

double red
 
double green
 
double blue
 

Detailed Description

The struct s_color stores the color values of ray tracing. It contains a field for red, green and blue values. If all components are 1, the final color is white. Otherwise, if all of them are 0, the resulting color is black. Therefore, each field has a range between 0 and 1.

Parameters
redRepresents the red value of the RGB scale.
greenRepresents the green value of the RGB scale.
blueRepresents the blue value of the RGB scale.