Skip to content

thibthib/preferred-color-scheme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔆 preferred-color-scheme 🌙

Really small package exporting utility functions to read the user's preferred color scheme. It can be useful when trying to match web applications colors to macOS theme selection.

Installation and usage

yarn add preferred-color-scheme
npm install preferred-color-scheme
import { getPreferredColorScheme } from 'preferred-color-scheme';

const preferredColorScheme = getPreferredColorScheme();

API

getPreferredColorScheme

Calculate which ColorScheme is the user's preferred one

➡️ returns ColorScheme: either "dark", "ligh", or "no-preference"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published