> For the complete documentation index, see [llms.txt](https://notes.eliasnorrby.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.eliasnorrby.com/css/currentcolor.md).

# The currentColor keyword

If we don't specify a color for a border, it will use the text's color by default. If we want to make this explicit, we can use the `currentColor` keyword:

```css
.box {
  color: royalblue;
  border: 2px solid currentColor;
}
```

This keyword can be used anywhere a color can be used, not just with borders.
