#ifndef _NAIVE_PPM_H
#define _NAIVE_PPM_H

#include <stddef.h>
#include <stdint.h>

// color modes
#define NONE 0
#define SOLID 1
#define LIGHT 2
#define DARK 3

typedef struct {
    unsigned char R;
    unsigned char G;
    unsigned char B;
} Pixel;

typedef struct {
    int mode;
    Pixel color;
} color_mode;

typedef struct {
    size_t width;
    size_t height;
    Pixel* P;
} PPM;

PPM* open_PPM(const char* filename);
int save_PPM(PPM* img, const char* filename);
void free_PPM(PPM* img);

Pixel pixel_color(Pixel p, color_mode mode);

#endif
