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.
Dependencies: EthernetInterfacePlusHostname RdWebServer mbed-rtos mbed
colourconverters.h
00001 #ifndef COLOURCONVERTERS__H 00002 #define COLOURCONVERTERS__H 00003 00004 typedef struct RgbColor 00005 { 00006 unsigned char r; 00007 unsigned char g; 00008 unsigned char b; 00009 00010 RgbColor(int inr, int ing, int inb) 00011 { 00012 r = (unsigned char) inr; 00013 g = (unsigned char) ing; 00014 b = (unsigned char) inb; 00015 } 00016 } RgbColor; 00017 00018 typedef struct HsvColor 00019 { 00020 unsigned char h; 00021 unsigned char s; 00022 unsigned char v; 00023 00024 HsvColor(int inh, int ins, int inv) 00025 { 00026 h = (unsigned char) inh; 00027 s = (unsigned char) ins; 00028 v = (unsigned char) inv; 00029 } 00030 00031 } HsvColor; 00032 00033 void HsvToRgb(HsvColor hsv, RgbColor& rgb); 00034 00035 void RgbToHsv(RgbColor rgb, HsvColor& hsv); 00036 00037 #endif
Generated on Wed Jul 13 2022 23:44:38 by
1.7.2