LumaOS  v0.1.116
An experimental x86-64 OS
Loading...
Searching...
No Matches
color.c File Reference

Color utilities. More...

#include <lib/color.h>
Include dependency graph for color.c:

Go to the source code of this file.

Functions

struct rgb get_rgb (uint8_t r, uint8_t g, uint8_t b)
 Creates an RGB color value from the 3 separate colors.
struct rgb add_rgb (struct rgb a, struct rgb b)
 Adds two RGB color values.
struct rgb sub_rgb (struct rgb a, struct rgb b)
 Subtracts the second RGB color from the first.

Detailed Description

Color utilities.

Author
Matheus Boscariol
Since
19/11/2026

Definition in file color.c.

Function Documentation

◆ add_rgb()

struct rgb add_rgb ( struct rgb a,
struct rgb b )

Adds two RGB color values.

Parameters
aFirst color
bSecond color
Returns
The sum of the two colors

Definition at line 22 of file color.c.

Here is the call graph for this function:

◆ get_rgb()

struct rgb get_rgb ( uint8_t r,
uint8_t g,
uint8_t b )

Creates an RGB color value from the 3 separate colors.

Parameters
rRed component
gGreen component
bBlue component
Returns
The RGB color value

Definition at line 12 of file color.c.

Here is the call graph for this function:

◆ sub_rgb()

struct rgb sub_rgb ( struct rgb a,
struct rgb b )

Subtracts the second RGB color from the first.

Parameters
aFirst color
bSecond color
Returns
The difference of the two colors

Definition at line 32 of file color.c.

Here is the call graph for this function: