Not Enough Math
Lightweight zero-dependency C++ math library
Loading...
Searching...
No Matches
nem::color Namespace Reference

Functions

static float4 rgb (float r, float g, float b)
 
static float4 rgba (float r, float g, float b, float a)
 
static float4 opaque (float3 rgb)
 
static float4 opaque (float4 rgba)
 
static float4 transparent (float3 rgb)
 
static float4 transparent (float4 rgba)
 

Variables

static constexpr float ALPHA_TRANSPARENT = 0.f
 
static constexpr float ALPHA_OPAQUE = 1.f
 
static float4 clear = rgba(0.f, 0.f, 0.f, ALPHA_TRANSPARENT)
 
static float4 white = rgb(1.f, 1.f, 1.f)
 
static float4 black = rgb(0.f, 0.f, 0.f)
 
static float4 red = rgb(1.f, 0.f, 0.f)
 
static float4 green = rgb(0.f, 1.f, 0.f)
 
static float4 blue = rgb(0.f, 0.f, 1.f)
 
static float4 cyan = rgb(0.f, 1.f, 1.f)
 
static float4 yellow = rgb(1.f, 1.f, 0.f)
 

Function Documentation

◆ opaque() [1/2]

static float4 nem::color::opaque ( float3 rgb)
inlinestatic

Definition at line 282 of file vec.hpp.

◆ opaque() [2/2]

static float4 nem::color::opaque ( float4 rgba)
inlinestatic

Definition at line 283 of file vec.hpp.

◆ rgb()

static float4 nem::color::rgb ( float r,
float g,
float b )
inlinestatic

Definition at line 280 of file vec.hpp.

◆ rgba()

static float4 nem::color::rgba ( float r,
float g,
float b,
float a )
inlinestatic

Definition at line 281 of file vec.hpp.

◆ transparent() [1/2]

static float4 nem::color::transparent ( float3 rgb)
inlinestatic

Definition at line 284 of file vec.hpp.

◆ transparent() [2/2]

static float4 nem::color::transparent ( float4 rgba)
inlinestatic

Definition at line 285 of file vec.hpp.

Variable Documentation

◆ ALPHA_OPAQUE

float nem::color::ALPHA_OPAQUE = 1.f
staticconstexpr

Definition at line 278 of file vec.hpp.

◆ ALPHA_TRANSPARENT

float nem::color::ALPHA_TRANSPARENT = 0.f
staticconstexpr

Definition at line 277 of file vec.hpp.

◆ black

float4 nem::color::black = rgb(0.f, 0.f, 0.f)
inlinestatic

Definition at line 289 of file vec.hpp.

◆ blue

float4 nem::color::blue = rgb(0.f, 0.f, 1.f)
inlinestatic

Definition at line 292 of file vec.hpp.

◆ clear

float4 nem::color::clear = rgba(0.f, 0.f, 0.f, ALPHA_TRANSPARENT)
inlinestatic

Definition at line 287 of file vec.hpp.

◆ cyan

float4 nem::color::cyan = rgb(0.f, 1.f, 1.f)
inlinestatic

Definition at line 293 of file vec.hpp.

◆ green

float4 nem::color::green = rgb(0.f, 1.f, 0.f)
inlinestatic

Definition at line 291 of file vec.hpp.

◆ red

float4 nem::color::red = rgb(1.f, 0.f, 0.f)
inlinestatic

Definition at line 290 of file vec.hpp.

◆ white

float4 nem::color::white = rgb(1.f, 1.f, 1.f)
inlinestatic

Definition at line 288 of file vec.hpp.

◆ yellow

float4 nem::color::yellow = rgb(1.f, 1.f, 0.f)
inlinestatic

Definition at line 294 of file vec.hpp.