3 #include "testing/testing.h"
17 EXPECT_NEAR(0.75f, theme_float.
r, 0.01f);
18 EXPECT_NEAR(0.5f, theme_float.
g, 0.01f);
19 EXPECT_NEAR(0.25f, theme_float.
b, 0.01f);
20 EXPECT_NEAR(0.5f, theme_float.
a, 0.01f);
40 EXPECT_NEAR(0.26f, linear.
r, 0.01f);
41 EXPECT_NEAR(0.11f, linear.
g, 0.01f);
42 EXPECT_NEAR(0.02f, linear.
b, 0.01f);
43 EXPECT_NEAR(0.5f, linear.
a, 0.01f);
50 EXPECT_NEAR(0.37f, premultiplied.
r, 0.01f);
51 EXPECT_NEAR(0.25f, premultiplied.
g, 0.01f);
52 EXPECT_NEAR(0.12f, premultiplied.
b, 0.01f);
53 EXPECT_NEAR(0.5f, premultiplied.
a, 0.01f);
60 EXPECT_NEAR(1.5f, straight.
r, 0.01f);
61 EXPECT_NEAR(1.0f, straight.
g, 0.01f);
62 EXPECT_NEAR(0.5f, straight.
b, 0.01f);
63 EXPECT_NEAR(0.5f, straight.
a, 0.01f);
71 EXPECT_NEAR(0.88f, theme.
r, 0.01);
72 EXPECT_NEAR(0.73f, theme.
g, 0.01);
73 EXPECT_NEAR(0.53f, theme.
b, 0.01);
74 EXPECT_NEAR(0.5f, theme.
a, 0.01);
83 EXPECT_NEAR(1.19f, theme.
r, 0.01);
84 EXPECT_NEAR(1.0f, theme.
g, 0.01);
85 EXPECT_NEAR(0.74f, theme.
b, 0.01);
86 EXPECT_NEAR(0.5f, theme.
a, 0.01);
125 EXPECT_NEAR(0.75f, decoded.
r, 0.01f);
126 EXPECT_NEAR(0.5f, decoded.
g, 0.01f);
127 EXPECT_NEAR(0.25f, decoded.
b, 0.01f);
128 EXPECT_NEAR(0.5f, decoded.
a, 0.01f);
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
void BLI_init_srgb_conversion(void)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
ColorSceneLinear4f< eAlpha::Premultiplied > premultiply_alpha() const
ColorSceneLinearByteEncoded4b< Alpha > encode() const
ColorSceneLinear4f< eAlpha::Straight > unpremultiply_alpha() const
ColorSceneLinear4f< Alpha > decode() const
ColorTheme4< uint8_t > to_4b() const
ColorTheme4< float > to_4f() const
TEST(any, DefaultConstructor)
BLI_INLINE ColorSceneLinear4f< eAlpha::Straight > BLI_color_convert_to_scene_linear(const ColorTheme4f &theme4f)
BLI_INLINE ColorTheme4< float > BLI_color_convert_to_theme4f(const ColorTheme4< uint8_t > &srgb4b)
BLI_INLINE ColorTheme4< uint8_t > BLI_color_convert_to_theme4b(const ColorTheme4< float > &srgb4f)