Blender V5.3
math_color.cc File Reference
#include "BLI_math_color.hh"
#include "BLI_math_color_c.hh"
#include "BLI_math_matrix.hh"
#include "BLI_math_matrix_c.hh"
#include "BLI_math_vector.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_simd.hh"
#include "BLI_utildefines.hh"
#include <algorithm>
#include <cstring>
#include "BLI_strict_flags.hh"

Go to the source code of this file.

Classes

struct  blender::math::locus_entry_t

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::math

Functions

bool blender::math::whitepoint_to_temp_tint (const float3 &white, float &temperature, float &tint)
float3 blender::math::whitepoint_from_temp_tint (float temperature, float tint)
float3x3 blender::math::chromatic_adaption_matrix (const float3 &from_XYZ, const float3 &to_XYZ)
Conversion to RGB
void blender::hsv_to_rgb (float h, float s, float v, float *r_r, float *r_g, float *r_b)
void blender::hsl_to_rgb (float h, float s, float l, float *r_r, float *r_g, float *r_b)
void blender::hsv_to_rgb_v (const float hsv[3], float r_rgb[3])
void blender::hsl_to_rgb_v (const float hsl[3], float r_rgb[3])
void blender::yuv_to_rgb (float y, float u, float v, float *r_r, float *r_g, float *r_b, int colorspace)
void blender::ycc_to_rgb (float y, float cb, float cr, float *r_r, float *r_g, float *r_b, int colorspace)
void blender::hex_to_rgb (const char *hexcol, float *r_r, float *r_g, float *r_b)
void blender::cpack_to_rgb (unsigned int col, float *r_r, float *r_g, float *r_b)
Conversion from RGB
void blender::rgb_to_yuv (float r, float g, float b, float *r_y, float *r_u, float *r_v, int colorspace)
void blender::rgb_to_ycc (float r, float g, float b, float *r_y, float *r_cb, float *r_cr, int colorspace)
void blender::rgb_to_hsv (float r, float g, float b, float *r_h, float *r_s, float *r_v)
void blender::rgb_to_hsv_v (const float rgb[3], float r_hsv[3])
void blender::rgb_to_hsl (float r, float g, float b, float *r_h, float *r_s, float *r_l)
void blender::rgb_to_hsl_compat (float r, float g, float b, float *r_h, float *r_s, float *r_l)
void blender::rgb_to_hsl_compat_v (const float rgb[3], float r_hsl[3])
void blender::rgb_to_hsl_v (const float rgb[3], float r_hsl[3])
void blender::rgb_to_hsv_compat (float r, float g, float b, float *r_h, float *r_s, float *r_v)
void blender::rgb_to_hsv_compat_v (const float rgb[3], float r_hsv[3])
unsigned int blender::hsv_to_cpack (float h, float s, float v)
unsigned int blender::rgb_to_cpack (float r, float g, float b)
Conversion to RGBA
bool blender::hex_to_rgba (const char *hexcol, float *r_r, float *r_g, float *r_b, float *r_a)
Profile Transformations
float blender::srgb_to_linearrgb (float c)
float blender::linearrgb_to_srgb (float c)
void blender::srgb_to_linearrgb_v3_v3 (float linear[3], const float srgb[3])
void blender::linearrgb_to_srgb_v3_v3 (float srgb[3], const float linear[3])
void blender::linearrgb_to_srgb_uchar4_n (unsigned char(*srgb)[4], const float(*linear)[4], int size, const float(*matrix)[3]=nullptr)
void blender::BLI_init_srgb_conversion ()
Color Transforms
MALWAYS_INLINE float blender::int_as_float (int32_t v)
MINLINE int blender::float_as_int (float f)
MALWAYS_INLINE float blender::_bli_math_fastpow (const int exp, const int e2coeff, const float arg)
MALWAYS_INLINE float blender::_bli_math_improve_5throot_solution (const float old_result, const float x)
MALWAYS_INLINE float blender::_bli_math_fastpow24 (const float arg)
MALWAYS_INLINE float blender::_bli_math_rsqrt (float in)
MALWAYS_INLINE float blender::_bli_math_fastpow512 (const float arg)
MALWAYS_INLINE float blender::srgb_to_linearrgb_approx (float c)
MALWAYS_INLINE float blender::linearrgb_to_srgb_approx (float c)

Variables

static const std::array< locus_entry_t, 31 > blender::math::planck_locus

Other

float blender::BLI_color_from_srgb_table [256]
void blender::hsv_clamp_v (float hsv[3], float v_max)
void blender::rgb_float_set_hue_float_offset (float rgb[3], float hue_offset)
void blender::rgb_byte_set_hue_float_offset (unsigned char rgb[3], float hue_offset)