mirror of https://github.com/espruino/BangleApps
New color option: foreground
parent
d07d9b4751
commit
f6a2a03448
|
@ -248,6 +248,9 @@ function getGradientColor(color, percent) {
|
|||
const colorList = [
|
||||
'#00FF00', '#80FF00', '#FFFF00', '#FF8000', '#FF0000'
|
||||
];
|
||||
if (color == "fg") {
|
||||
color = colorFg;
|
||||
}
|
||||
if (color == "green-red") {
|
||||
const colorIndex = Math.round(colorList.length * percent);
|
||||
return colorList[Math.min(colorIndex, colorList.length) - 1] || "#00ff00";
|
||||
|
|
|
@ -14,8 +14,10 @@
|
|||
const valuesCircleTypes = ["empty", "steps", "stepsDist", "hr", "battery", "weather", "sunprogress", "temperature", "pressure", "altitude"];
|
||||
const namesCircleTypes = ["empty", "steps", "distance", "heart", "battery", "weather", "sun", "temperature", "pressure", "altitude"];
|
||||
|
||||
const valuesColors = ["", "#ff0000", "#00ff00", "#0000ff", "#ffff00", "#ff00ff", "#00ffff", "#fff", "#000", "green-red", "red-green"];
|
||||
const namesColors = ["default", "red", "green", "blue", "yellow", "magenta", "cyan", "white", "black", "green->red", "red->green"];
|
||||
const valuesColors = ["", "#ff0000", "#00ff00", "#0000ff", "#ffff00", "#ff00ff",
|
||||
"#00ffff", "#fff", "#000", "green-red", "red-green", "fg"];
|
||||
const namesColors = ["default", "red", "green", "blue", "yellow", "magenta",
|
||||
"cyan", "white", "black", "green->red", "red->green", "foreground"];
|
||||
|
||||
const weatherData = ["empty", "humidity", "wind"];
|
||||
|
||||
|
|
Loading…
Reference in New Issue