# MaxContrast Formatter Examples

## Example 1

```json
{
  "context": {
    "contrastConfig": {
      "colors": [
        "white",
        "black"
      ]
    }
  },
  "options": {
    "color1": "green",
    "maxContrastOfColor1": "> color1 | maxContrast(contrastConfig)",
    "color2": "gray",
    "maxContrastOfColor2": "> color2 | maxContrast(contrastConfig)"
  },
  "dataSources": {
    "primary": {
      "data": {
        "fields": [
          {
            "name": "foo"
          }
        ],
        "columns": [
          [
            100,
            200
          ]
        ]
      }
    }
  }
}
```
