You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
526 B

14 years ago
//
// color.h
//
// Copyright (c) 2010 LearnBoost <tj@learnboost.com>
//
14 years ago
#ifndef __COLOR_PARSER_H__
#define __COLOR_PARSER_H__
14 years ago
#include <stdio.h>
14 years ago
#include <stdint.h>
#include <string.h>
#include <stddef.h>
14 years ago
/*
* RGBA struct.
*/
typedef struct {
double r, g, b, a;
} rgba_t;
14 years ago
/*
14 years ago
* Prototypes.
*/
rgba_t
14 years ago
rgba_create(uint32_t rgba);
14 years ago
int32_t
rgba_from_string(const char *str, short *ok);
14 years ago
void
rgba_to_string(rgba_t rgba, char *buf, size_t buf_size);
14 years ago
void
14 years ago
rgba_inspect(int32_t rgba);
14 years ago
#endif /* __COLOR_PARSER_H__ */