From c2e34b46885ad1a33941b0c6f51acf3e787bb6f1 Mon Sep 17 00:00:00 2001 From: Juergen Jung Date: Sun, 19 Feb 2017 22:03:19 +0100 Subject: [PATCH] Documentation syntax highlighting --- Readme.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Readme.md b/Readme.md index 8903fa2..61af63f 100644 --- a/Readme.md +++ b/Readme.md @@ -20,26 +20,27 @@ Homie Schild Firmware ## Color To convert RGB value use the following bash code: -```bash +```shell function rgbToColor { echo $(( $(($1<<16)) + $(($2<<8)) + $(($3)) )); -} +} function colorToRGB { echo "Red: $(($1>>16&0xff))" echo "Green: $(($1>>8&0xff))" echo "Blue: $(($1&0xff))" } + ``` #### Example RGB Value to color uint32_t -```bash +```shell bash$ rgbToColor 155 230 32 10216992 bash$ ``` uint32_t to RGB values -```bash +```shell bash$ colorToRGB 10216992 Red: 155 Green: 230 @@ -61,7 +62,7 @@ You can specify the color by set *color_0* and *color_1* Fades from effect color_0 to effect_color_1 * **randomfade** Fades thru an alternating color pattern -* **none** +* **none** Stop all effects ## Effect colors