Hi All,
I have a stats table which I have set up to use as an alarm display where each line is coloured to donate the severity.
This is working fine except that when the table row colour is red or blue the text in the cells is white which my users don't like they want the text to stay black for all background colours.
This seems to be a default behaviour, I have looked round the documentation and asked my friend google but cant fins a way to suppress it.
Can anyone point me towards a solution.
Cheers Mike
I think I have foungd it you need the !important after the color: black
Yes, that's what I showed as I thought you may have forgotten it 😀
On my live dashboard the css is in the simplexml
This is an example dashboard showing the issue
<dashboard>
<label>Text Colour</label>
<row>
<panel>
<table>
<title>Colour vs text</title>
<search>
<query>| makeresults | eval whiteBg="White Background", redBg="Red Background" | table whiteBg redBg</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="drilldown">none</option>
<format type="color" field="redBg">
<colorPalette type="map">{"Red Background":#FF0000}</colorPalette>
</format>
</table>
</panel>
</row>
</dashboard>
You can see the whiteBG has black text and the redBG has white text, I have raised a case on this as well
<dashboard>
<label>Text Colour</label>
<row>
<panel>
<html>
<style>
#table td {
color: black !important;
}
</style>
</html>
<table id="table">
<title>Colour vs text</title>
<search>
<query>| makeresults | eval whiteBg="White Background", redBg="Red Background" | table whiteBg redBg</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="drilldown">none</option>
<format type="color" field="redBg">
<colorPalette type="map">{"Red Background":#FF0000}</colorPalette>
</format>
</table>
</panel>
</row>
</dashboard>
Have you tried using CSS to set the colour to black for the table data cells?
@ITWhisperer Yes I have tried that, the colour seems to change as the colour saturation increases
Can you share your SimpleXML for this? Do you have the CSS in the SimpleXML or separately in a .css file?
Example of font colour attached