https://github.com/pshihn/recolored-image
Custom element to show image shifted to a different color
https://github.com/pshihn/recolored-image
Last synced: about 2 months ago
JSON representation
Custom element to show image shifted to a different color
- Host: GitHub
- URL: https://github.com/pshihn/recolored-image
- Owner: pshihn
- License: mit
- Created: 2021-05-04T18:15:02.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-05T00:06:13.000Z (about 4 years ago)
- Last Synced: 2025-03-18T13:28:34.206Z (2 months ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# recolored-image
Custom element to show image shifted to a different color.
Sometimes you want to show an image, usually a logo in different colors. If you had the logo in SVG, then you could easily change the colors using CSS. But what if the image is a png or a jpeg?
`recolored-image` is a custom-element to show an image color shifted to a target color. You can also save this new image.
This adapted and inspired from [@vjeux/image-recolor/](https://github.com/vjeux/image-recolor/) and the related [@tweet](https://twitter.com/Vjeux/status/1387856671238627333?s=20)
## Usage
Install from npm
```
npm i recolored-image
```or use directly in your web page
```html
```
In your HTML
```html
![]()
```
## Demo
You can play with it live on [Codesandbox](https://codesandbox.io/s/recolored-image-demo-uq8q4)