OldSchool Library
|
Color manipulation utilities. More...
Macros | |
#define | RGB(r, v, b) |
Creates a 32-bit opaque color. | |
#define | RGBA(r, v, b, a) |
Creates a 32-bit color with alpha (transparency). | |
#define | RGB12(r, v, b) |
Creates a 12-bit opaque color. | |
#define | RGBA12(r, v, b, a) |
Creates a 12-bit color with alpha. | |
#define | RGB15(r, v, b) |
Creates a 15-bit opaque color. | |
#define | RGBA15(r, v, b, a) |
Creates a 15-bit color with alpha. | |
#define | RGB16(r, v, b) |
Creates a 16-bit color. | |
Typedefs | |
typedef unsigned long | OSL_COLOR |
Color manipulation utilities.
This group contains macros for creating and manipulating colors in various bit formats.
#define RGB | ( | r, | |
v, | |||
b ) |
Creates a 32-bit opaque color.
This macro generates a 32-bit color value with full opacity (alpha = 255).
r | Red component (0-255) |
v | Green component (0-255) |
b | Blue component (0-255) |
#define RGBA | ( | r, | |
v, | |||
b, | |||
a ) |
Creates a 32-bit color with alpha (transparency).
This macro generates a 32-bit color value, allowing for semi-transparency.
r | Red component (0-255) |
v | Green component (0-255) |
b | Blue component (0-255) |
a | Alpha component (0-255) |
#define RGB12 | ( | r, | |
v, | |||
b ) |
Creates a 12-bit opaque color.
This macro generates a 12-bit color value with full opacity. The red, green, and blue components are scaled down to fit the 12-bit format (4 bits per channel).
r | Red component (0-255) |
v | Green component (0-255) |
b | Blue component (0-255) |
#define RGBA12 | ( | r, | |
v, | |||
b, | |||
a ) |
Creates a 12-bit color with alpha.
This macro generates a 12-bit color value, including an alpha component for transparency.
r | Red component (0-255) |
v | Green component (0-255) |
b | Blue component (0-255) |
a | Alpha component (0-255) |
#define RGB15 | ( | r, | |
v, | |||
b ) |
Creates a 15-bit opaque color.
This macro generates a 15-bit color value with full opacity. The red, green, and blue components are scaled down to fit the 15-bit format (5 bits for red and blue, 5 or 6 bits for green).
r | Red component (0-255) |
v | Green component (0-255) |
b | Blue component (0-255) |
#define RGBA15 | ( | r, | |
v, | |||
b, | |||
a ) |
Creates a 15-bit color with alpha.
This macro generates a 15-bit color value, including an alpha component for transparency.
r | Red component (0-255) |
v | Green component (0-255) |
b | Blue component (0-255) |
a | Alpha component (0-255) |
#define RGB16 | ( | r, | |
v, | |||
b ) |
Creates a 16-bit color.
This macro generates a 16-bit color value with no alpha channel. The red, green, and blue components are scaled down to fit the 16-bit format (5 bits for red, 6 bits for green, 5 bits for blue).
r | Red component (0-255) |
v | Green component (0-255) |
b | Blue component (0-255) |
typedef unsigned long OSL_COLOR |
Represents a true color value in OSLib.