-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathColor.h
More file actions
34 lines (27 loc) · 763 Bytes
/
Color.h
File metadata and controls
34 lines (27 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* Color.h
* Part of the Loochi project: http://www.tbideas.com/
*
* Copyright 2012 - TBIdeas.com
* Distributed under the CC-BY-SA license.
* http://creativecommons.org/licenses/by-sa/3.0/
*
*/
#ifndef __COLOR_H__
#define __COLOR_H__
#include "Arduino.h"
class Color
{
public:
Color();
Color(unsigned long red, unsigned long green, unsigned long blue);
unsigned long red;
unsigned long green;
unsigned long blue;
/*
* Returns the color at point p calculated by linear interpolation of the
* color A at point posA and the color B at point posB.
*/
static Color interpolateColor(const unsigned long p, const unsigned long posA, const unsigned long posB, const Color A, const Color B);
};
#endif