Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lib/Color.cpp
- Revision:
- 1:5801c141ea90
- Parent:
- 0:4dc676502a4e
--- a/lib/Color.cpp Thu Nov 19 15:55:39 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-
-#include "Color.h"
-
-Color::Color(int red, int green, int blue){
- this->red = red;
- this->green = green;
- this->blue = blue;
-}
-
-Color::Color(float red, float green, float blue){
- this->red = floatToColorValue(red);
- this->green = floatToColorValue(green);
- this->blue = floatToColorValue(blue);
-}
-
-int Color::floatToColorValue(float value){
- return (int) (value * MAX_COLOR_VALUE);
-}
-
-Color::Color(int Color){ //AABBCC
- red = (Color >> 16) & 0x0000FF;
- green = (Color >> 8) & 0x0000FF;
- blue = Color & 0x0000FF;
-}
-
-int Color::getHex(){
- return (red >> 16) + (green >> 8) + (blue >> 0); //verander shift register
-}
-
-int Color::getRed(){
- return red;
-}
-
-int Color::getGreen(){
- return green;
-}
-
-int Color::getBlue(){
- return blue;
-}
-
-
-
-
-