# roundel/picocolors

> Every export of roundel/picocolors, with its signature and doc comment: createColors, isColorSupported, picocolors, module.exports, plus 2 types.

Source: https://roundel.interlace.tools/docs/api/picocolors

<!-- Generated by scripts/api-reference.ts from the built dist/*.d.ts. Do not edit; run `npx tsx scripts/api-reference.ts`. -->

```ts
import picocolors from 'roundel/picocolors';
import { createColors, isColorSupported, module.exports } from 'roundel/picocolors';
```

## Functions

### createColors

The styles, coloured or not. `enabled` defaults to {@link isColorSupported}.

```ts
function createColors(enabled?: boolean): Colors;
```

| Parameter | Type |
| :-- | :-- |
| `enabled` (optional) | `boolean` |

**Returns** `Colors`

## Constants

### default

The default export, declared as `picocolors`.

picocolors' module: the styles for this process, and `createColors`.

```ts
const picocolors: Colors & {
    createColors: typeof createColors;
};
```

### isColorSupported

Whether picocolors would colour this process's output.

```ts
const isColorSupported: boolean;
```

### module.exports

picocolors' module: the styles for this process, and `createColors`.

```ts
const picocolors: Colors & {
    createColors: typeof createColors;
};
```

## Types

### Colors

What `createColors` returns: whether colour is on, and every style.

```ts
type Colors = {
    isColorSupported: boolean;
} & Record<StyleName, Formatter>;
```

### Formatter

One style: the input, stringified, between an open and a close code.

```ts
type Formatter = (input: unknown) => string;
```
