summaryrefslogtreecommitdiff
path: root/test/blender/blender.c
blob: 344ce0453633ba1646dcf2ee1661611444446459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "blender/blender.h"
#include <assert.h>

static void test_color_blending() {
  Color a = {{0xFF, 0xED, 0x00, 0x00}};
  Color b = {{0x00, 0x47, 0xAB, 0x00}};
  Color result = blender_blend_colors(a, b, 0.125);

  assert(color_equals(result, (Color) {{0xEE, 0xDF, 0x3C, 0x00}}));
}

int main(int argc, char **argv) {
  test_color_blending();
  return 0;
}