---
description: >-
  Starting with v15 you can use a set of color placeholders in Expression
  Bindings that respect the current theme (light / dark)
---

# Colors in Expression Bindings \[v15+]

When using ExpressionBindings to control the foreground of text based on a condition it's useful to fallback to the `Default` text color for the current theme. This can now be achieved by using the following placeholder strings in your binding expressions:

* "SUCCESS\_COLOR"&#x20;
* "INFORMATION\_COLOR"&#x20;
* "WARNING\_COLOR"&#x20;
* "CRITICAL\_COLOR"&#x20;
* "EXCEPTION\_COLOR"&#x20;
* "DEFAULT\_TEXT\_COLOR"&#x20;
* "DEFAULT\_BACKGROUND\_COLOR"

Here's an example of how to use them:

```
$"iif(double(int(@RowData.Row.{col.BindingPath})) < 0, \"CRITICAL_COLOR\", \"DEFAULT_TEXT_COLOR\")"
```

{% hint style="info" %}
Please note that any XAML resource can be accessed using this approach, as long as you use the key that's defined in the system theme.
{% endhint %}
