---
url: /reference/api/theme/Function.detectColor.md
---
# Function: detectColor()

```ts twoslash
// @include: imports
function detectColor(env?, isTTY?): boolean;
```

Defined in: [index.ts:81](https://github.com/clercjs/clerc/blob/efcfe345a2e69adae5b210ad59e25fae73d0b3a4/packages/theme/src/index.ts#L81)

## Parameters

`env?`

`Readonly`<`Record`<`string`, `string` | `undefined`>>

`process.env`

`isTTY?`

`boolean`

`...`

## Returns

`boolean`
