https://github.com/knowscount/hex-blender
a library for finding out the hex value between two values.
https://github.com/knowscount/hex-blender
color colour hex typescript util
Last synced: about 1 year ago
JSON representation
a library for finding out the hex value between two values.
- Host: GitHub
- URL: https://github.com/knowscount/hex-blender
- Owner: KnowsCount
- License: wtfpl
- Created: 2022-03-30T07:19:49.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-31T14:53:16.000Z (about 4 years ago)
- Last Synced: 2025-01-22T17:45:00.271Z (over 1 year ago)
- Topics: color, colour, hex, typescript, util
- Language: TypeScript
- Homepage: https://knowscount.github.io/hex-blender/
- Size: 80.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hex-blender
> a library for finding out the hex value between two hex values.
## 🤤 usage
to install the library as a dependency to your project, run
```bash
yarn add hex-blender
# or, according to your preference
npm install hex-blender
```
import the library in your project like below, and you can get started using it directly.
```ts
// simply import the library
import hexBlend from 'hex-blender'
// and then ... just use it like you would any library
const getMiddleColour = (colourOne, colourTwo) => {
return hexBlend(colourOne, colourTwo, 4, 2)
}
// adding `#` or not is optional
getMiddleColour('ff0000', '#00ff00') // '#7f7f00'
```