Iβve tried to modify the color and have more than three colors for a gauge like described in this thread.
Modifying the colors works fine, but when I have the blue line in the severity configuration, the gauge is always blue. The theme is like in this thread.
The cards config:
Yep, pasted the wrong link. Changed it now. Thanks for clarifying the severity to have only three colors plus blue for all below. Which kind of meter card would you suggest to have more or even continuous colors like that?
I was struggling on the same problem and generated gradient colors using the colorRampPalette in R. Here are the colors from red to yellow to red in 50 steps:
β#00FF00β β#0AFF00β β#14FF00β β#1FFF00β β#29FF00β β#34FF00β β#3EFF00β β#48FF00β β#53FF00β β#5DFF00β β#68FF00β β#72FF00β β#7CFF00β β#87FF00β β#91FF00β β#9CFF00β β#A6FF00β β#B0FF00β β#BBFF00β β#C5FF00β β#D0FF00β β#DAFF00β β#E4FF00β β#EFFF00β β#F9FF00β β#FFF900β β#FFEF00β β#FFE400β β#FFDA00β β#FFD000β β#FFC500β β#FFBB00β β#FFB000β β#FFA600β β#FF9C00β β#FF9100β β#FF8700β β#FF7C00β β#FF7200β β#FF6800β β#FF5D00β β#FF5300β β#FF4800β β#FF3E00β β#FF3400β β#FF2900β β#FF1F00β β#FF1400β β#FF0A00β β#FF0000β
And here is the R-Code to generate these colors and to plug them into the yaml code for color segments:
# Colors can be exchanged
colfunc <- colorRampPalette(c("#00FF00", "#FFFF00", "#FF0000"))
# Scale range can be changed
Scale.Values <- seq(1, 50)
Colors <- colfunc(length(Scale.Values))
Code <- paste0(" - from: ", Scale.Values[1],
"\n color: '", Colors[1],"'\n")
for(s in 2:length(Scale.Values)) {
Code <- paste0(Code, " - from: ", Scale.Values[s],
"\n color: '", Colors[s],"'\n")
}
cat(Code)