# Kibana - Changing text color based on content

**URL:** <https://discuss.elastic.co/t/kibana-changing-text-color-based-on-content/17425>\
**Category:** Elasticsearch\
**Created:** [May 9, 2014, 3:52am UTC](https://discuss.elastic.co/t/kibana-changing-text-color-based-on-content/17425 "2014-05-09T03:52:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Laplante](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@Chris\_Laplante](https://discuss.elastic.co/u/Chris_Laplante)\
**Post date:** [May 9, 2014, 3:52am UTC](https://discuss.elastic.co/t/kibana-changing-text-color-based-on-content/17425/1 "2014-05-09T03:52:41Z")

</div>

We have some data that uses the common Red/Yellow/Green verbiage. When  
presenting this data in a Kibana table panel, I would like to modify the  
color of the text. I notice Marvel does this for the global status.

Anyone doing anything like this, or have ideas where to inject it? CSS?

Thanks,

-Chris

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/58bcb3e1-3adc-4539-8270-19663d3701eb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/58bcb3e1-3adc-4539-8270-19663d3701eb%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [May 9, 2014, 1:28pm UTC](https://discuss.elastic.co/t/kibana-changing-text-color-based-on-content/17425/2 "2014-05-09T13:28:17Z")

</div>

You'll likely need to modify the panel code (module.js/module.html). In the  
Marvel panels, it's just some Javascript to change the css of the text  
element depending on what its value is.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/514560a6-1c45-4299-99d4-2f224d332a29%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/514560a6-1c45-4299-99d4-2f224d332a29%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Chris\_Laplante](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@Chris\_Laplante](https://discuss.elastic.co/u/Chris_Laplante)\
**Post date:** [May 11, 2014, 8:31pm UTC](https://discuss.elastic.co/t/kibana-changing-text-color-based-on-content/17425/3 "2014-05-11T20:31:57Z")

</div>

In case it comes up for someone else, I figured it out.

In kibana/app/panels/table/module.js I added:

replace(/^Green$/g,' ![](https://sea2.discourse-cdn.com/elastic/images/circle_green.png)').replace(/^Yellow$/g,' ![](https://sea2.discourse-cdn.com/elastic/images/circle_yellow.png)').replace(/^Red$/g,' ![](https://sea2.discourse-cdn.com/elastic/images/circle_red.png)')

With the other replace statements after the ones that strip out \<\>. The  
only thing I had to do was modify the trim settings some.

Pretty slick results. Could be something to consider adding more formally  
to kibana.

Thanks,

-Chris

On Fri, May 9, 2014 at 6:28 AM, 'Binh Ly' via elasticsearch \<  
[elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)\> wrote:

> You'll likely need to modify the panel code (module.js/module.html). In  
> the Marvel panels, it's just some Javascript to change the css of the text  
> element depending on what its value is.
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/5oVHx1jVjPs/unsubscribe](https://groups.google.com/d/topic/elasticsearch/5oVHx1jVjPs/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/514560a6-1c45-4299-99d4-2f224d332a29%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/514560a6-1c45-4299-99d4-2f224d332a29%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/514560a6-1c45-4299-99d4-2f224d332a29%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/514560a6-1c45-4299-99d4-2f224d332a29%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAPWb6tqu1NzRUeJz8no0O-fTJ8YhYDAhYBHeUxk86\_Z\_G9XTKw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPWb6tqu1NzRUeJz8no0O-fTJ8YhYDAhYBHeUxk86_Z_G9XTKw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:30am UTC](https://discuss.elastic.co/t/kibana-changing-text-color-based-on-content/17425/4 "2017-07-06T01:30:16Z")

</div>


