30 lines
1.3 KiB
C
30 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* color.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/10/01 16:25:50 by mcolonna #+# #+# */
|
|
/* Updated: 2024/10/02 15:41:43 by mcolonna ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef COLOR_H
|
|
# define COLOR_H
|
|
|
|
# include <linux/types.h>
|
|
|
|
// TODO Must the transparency be 0 or 255?
|
|
/// @brief Represents an TRGB color in 0xTTRRGGBB format.
|
|
typedef __u32 t_color;
|
|
|
|
/// @brief Convert a color from each color value to a t_color.
|
|
///
|
|
/// @param red Level of red from 0 to 255.
|
|
/// @param green Level of green from 0 to 255.
|
|
/// @param blue Level of blue from 0 to 255.
|
|
/// @return The result.
|
|
t_color color_from_rgb(int red, int green, int blue);
|
|
|
|
#endif
|