 const uint32_t HR = 60L * MIN;
 const uint32_t HALFDAY = 12L * HR;
 
-#define RGB(r, g, b) (((uint32_t(r) & 0xff) << 16) | ((uint32_t(g) & 0xff) << 8) | (uint32_t(b) & 0xff))
-#define R(rgb) ((uint32_t(rgb)>>16) & 0xff)
-#define G(rgb) ((uint32_t(rgb)>>8) & 0xff)
-#define B(rgb) ((uint32_t(rgb)) & 0xff)
+static uint32_t RGB(byte r, byte g, byte b, byte a=0) {
+    return uint32_t(a) << 24 | uint32_t(r) << 16 | uint32_t(g) << 8 | uint32_t(b);
+}
+static byte R(uint32_t color) { return color >> 16; }
+static byte G(uint32_t color) { return color >> 8; }
+static byte B(uint32_t color) { return color; }
+static byte A(uint32_t color) { return color >> 24; }
 
 Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, LED_PIN, NEO_GRB | NEO_KHZ800);
 

uint32_t epochTime = 0;
float drift = 1;

const long CLOCK_MARK_COLOR = RGB(0, 0, 10);

int set_color_at_clock(uint32_t num, uint32_t max, uint32_t color) {
    num %= max;
    float value = float(num) / max;
    value += 0.25 / CLOCK_FACE_SIZE;

    while (t_value < 0) t_value += 4;
    t_value = t_value * CLOCK_FACE_SIZE;
    float ratio = 1 - t_value + int(t_value);
    uint16_t location = uint16_t(t_value) % NUM_LEDS;
    float r = ratio*ratio;
    setPixelColor(location, color, sqrt(r) * alpha);
    location = (location + 1) % NUM_LEDS;
    ratio = 1 - ratio;
    r = ratio*ratio;
    setPixelColor(location, color, sqrt(r) * alpha);
}

byte read() {
