Skip to content

ajlende/color-fns

Repository files navigation

color-fns

⚠︎⚠︎⚠︎This project is still in early development. Expect breaking changes frequently at this stage.⚠︎⚠︎⚠︎

It's like date-fns for colors.

  • Zero Dependencies: No useless bloat. No additional code to audit.
  • Modular: Pick what you need. Supports tree-shaking.
  • Immutable & Pure: Makes your code easier to read and understand.
  • TypeScript: Prevent runtime type-related errors.
import { convert, fromAny, toHex } from "color-fns"

convert(fromAny, toHex, [0.2, 0.4, 0.6, 1])
//=> "#336699"

License

MIT © Alex Lende