RGB Converter
This commit is contained in:
parent
0fca0ea91d
commit
078fa47c4c
|
@ -23,7 +23,7 @@ To convert RGB value use the following bash code:
|
||||||
```shell
|
```shell
|
||||||
function rgbToColor {
|
function rgbToColor {
|
||||||
echo $(( $(($1<<16)) + $(($2<<8)) + $(($3)) ));
|
echo $(( $(($1<<16)) + $(($2<<8)) + $(($3)) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
function colorToRGB {
|
function colorToRGB {
|
||||||
echo "Red: $(($1>>16&0xff))"
|
echo "Red: $(($1>>16&0xff))"
|
||||||
|
|
Loading…
Reference in New Issue