marzeq/accent-score
clone
#define ACCENT_SCORE_IMPLEMENTATION
#include "accent_score.h"
#include <stdio.h>
static RGB get_rgb(uint32_t hex) {
RGB c;
c.r = (hex >> 16) & 0xff;
c.g = (hex >> 8) & 0xff;
c.b = hex & 0xff;
return c;
}
int main() {
RGB background = get_rgb(0x36363a);
RGB accent = get_rgb(0xc2846a);
printf("Accent score: %.2f\n", accent_score(accent, background));
}