# @talves/itui-color-modes

> Adds support for user-controlled color modes

Latest version **0.3.0-alpha.0** (published 2020-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @talves/itui-color-modes
pnpm add @talves/itui-color-modes
yarn add @talves/itui-color-modes
bun add @talves/itui-color-modes
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0-alpha.0 |
| Published | 2020-01-09 |
| First published | 2020-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 71.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tony Alves |
| Maintainers | talves |

## Links

- npm: https://www.npmjs.com/package/@talves/itui-color-modes
- Repository: https://github.com/talves/theme-ui
- Homepage: https://github.com/talves/theme-ui#readme
- Issues: https://github.com/talves/theme-ui/issues
- npm.io page: https://npm.io/package/@talves/itui-color-modes

## Dependencies (5)

- [deepmerge](https://npm.io/package/deepmerge.md) ^4.2.2
- [@emotion/core](https://npm.io/package/@emotion/core.md) ^10.0.0
- [@theme-ui/css](https://npm.io/package/@theme-ui/css.md) ^0.3.0-alpha.0
- [@theme-ui/core](https://npm.io/package/@theme-ui/core.md) ^0.3.0-alpha.0
- [@talves/itui-core](https://npm.io/package/@talves/itui-core.md) ^0.3.0-alpha.0

## Recent versions

- 0.3.0-alpha.0 (latest) — 2020-01-09

## README

# @talves/itui-color-modes

Adds support for user-controlled color modes

**Note:** *This package is included in the main `itui` package, and generally should not be used on its own.*

```sh
npm i @theme-ui/color-modes
```

```jsx
import { createThemeProvider } from '@theme-ui/core'
import { createColorModeProvider } from '@theme-ui/color-modes'
import theme from './theme'

export default ({ children, IsolatedContext }) => {
  const { ThemeProvider } = createThemeProvider(
    IsolatedContext
  )
  const { ColorModeProvider } = createColorModeProvider(
    IsolatedContext
  )

  return (
    <ThemeProvider theme={theme}>
      <ColorModeProvider>
        {children}
      </ColorModeProvider>
    </ThemeProvider>
  )
}
```

## API

- `InitializeColorMode`
- `createColorModeProvider`
    - `useColorMode`
    - `ColorModeProvider`

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