# @types/use-color-scheme

> TypeScript definitions for use-color-scheme

Latest version **1.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/use-color-scheme
pnpm add @types/use-color-scheme
yarn add @types/use-color-scheme
bun add @types/use-color-scheme
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2023-11-07 |
| First published | 2021-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51491 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/use-color-scheme
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-color-scheme
- npm.io page: https://npm.io/package/@types/use-color-scheme

## Recent versions

- 1.1.4 (latest) — 2023-11-07
- 1.1.2 (ts4.3) — 2023-08-30
- 1.1.1 (ts3.6) — 2021-06-12
- 1.1.0 (ts3.4) — 2021-02-06
- 1.1.3 — 2023-10-18

## README

# Installation
> `npm install --save @types/use-color-scheme`

# Summary
This package contains type definitions for use-color-scheme (https://github.com/mujo-code/use-color-scheme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-color-scheme.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-color-scheme/index.d.ts)
````ts
type Preference = typeof PREFERENCES[keyof typeof PREFERENCES];

export const PREFERENCES: {
    DARK: "dark";
    LIGHT: "light";
    NONE: "no-preference";
};

export const values: Array<typeof PREFERENCES[keyof typeof PREFERENCES]>;

export function makeQuery(pref: Preference): string;
export function matchPreference(pref: Preference): MediaQueryList;
export function getPreference(preferences: Preference[]): Preference;
export function attachListener(pref: Preference, setScheme: (pref: Preference) => void): () => void;
export function useColorScheme(): { scheme: Preference };

export {};

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Marton Lederer](https://github.com/martonlederer).

---
_Source: https://npm.io/package/@types/use-color-scheme · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
