{"id":19653018,"url":"https://github.com/csstools/postcss-infrared-filter","last_synced_at":"2025-04-28T17:31:08.436Z","repository":{"id":57328133,"uuid":"45749990","full_name":"csstools/postcss-infrared-filter","owner":"csstools","description":"Use an infrared photography filter in CSS","archived":true,"fork":false,"pushed_at":"2015-11-07T20:50:26.000Z","size":0,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-21T22:01:46.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/jonathantneal/postcss-infrared-filter","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csstools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-07T18:57:36.000Z","updated_at":"2024-12-28T18:46:54.000Z","dependencies_parsed_at":"2022-08-23T14:01:09.773Z","dependency_job_id":null,"html_url":"https://github.com/csstools/postcss-infrared-filter","commit_stats":null,"previous_names":["jonathantneal/postcss-infrared-filter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-infrared-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-infrared-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-infrared-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-infrared-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-infrared-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251216349,"owners_count":21553982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:12:55.819Z","updated_at":"2025-04-28T17:31:08.406Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infrared Filter\n\n\u003cimg align=\"right\" width=\"135\" height=\"95\" src=\"http://postcss.github.io/postcss/logo-leftp.png\" title=\"Philosopher’s stone, logo of PostCSS\"\u003e\n\n[![NPM Version][npm-img]][npm] [![Build Status][ci-img]][ci]\n\n[Infrared Filter] lets you use an infrared photography filter in CSS. This effect was created and coded by [Una Kravets]’ in her excellent post [Infrared Photography].\n\n```css\n/* before */\n\n.creek {\n\tbackground: url(https://upload.wikimedia.org/wikipedia/commons/0/06/Cayoosh-creek.jpg);\n\tfilter: infrared(-60);\n\theight: 426px;\n\tposition: relative;\n\twidth: 568px;\n}\n\n/* after */\n\n.creek::after {\n\tbackground: url(https://upload.wikimedia.org/wikipedia/commons/0/06/Cayoosh-creek.jpg);\n\tposition: relative;\n\tfilter: invert(1) saturate(.75) hue-rotate(-60deg);\n\tcontent: \"\";\n\tdisplay: block;\n\theight: 100%;\n\tmix-blend-mode: color;\n\tproperty: absolute;\n\twidth: 100%;\n}\n\n.creek {\n\tbackground: url(https://upload.wikimedia.org/wikipedia/commons/0/06/Cayoosh-creek.jpg);\n\theight: 426px;\n\tposition: relative;\n\twidth: 568px;\n}\n```\n\n## Usage\n\nAdd [Infrared Filter] to your build tool:\n\n```bash\nnpm install postcss-infrared-filter --save-dev\n```\n\n#### Node\n\n```js\nrequire('postcss-infrared-filter').process(YOUR_CSS);\n```\n\n#### PostCSS\n\nAdd [PostCSS] to your build tool:\n\n```bash\nnpm install postcss --save-dev\n```\n\nLoad [Infrared Filter] as a PostCSS plugin:\n\n```js\npostcss([\n    require('postcss-infrared-filter')()\n]);\n```\n\n#### Gulp\n\nAdd [Gulp PostCSS] to your build tool:\n\n```bash\nnpm install gulp-postcss --save-dev\n```\n\nEnable [Infrared Filter] within your Gulpfile:\n\n```js\nvar postcss = require('gulp-postcss');\n\ngulp.task('css', function () {\n    return gulp.src('./css/src/*.css').pipe(\n        postcss([\n            require('postcss-infrared-filter')()\n        ])\n    ).pipe(\n        gulp.dest('./css')\n    );\n});\n```\n\n#### Grunt\n\nAdd [Grunt PostCSS] to your build tool:\n\n```bash\nnpm install grunt-postcss --save-dev\n```\n\nEnable [Infrared Filter] within your Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-postcss');\n\ngrunt.initConfig({\n    postcss: {\n        options: {\n            processors: [\n                require('postcss-infrared-filter')()\n            ]\n        },\n        dist: {\n            src: 'css/*.css'\n        }\n    }\n});\n```\n\n[ci]:      https://travis-ci.org/jonathantneal/postcss-infrared-filter\n[ci-img]:  https://img.shields.io/travis/jonathantneal/postcss-infrared-filter.svg\n[npm]:     https://www.npmjs.com/package/postcss-infrared-filter\n[npm-img]: https://img.shields.io/npm/v/postcss-infrared-filter.svg\n\n[Gulp PostCSS]:  https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n[PostCSS]:       https://github.com/postcss/postcss\n\n[Infrared Photography]: http://una.im/infrared/#💁\n[Una Kravets]:          https://twitter.com/Una\n\n[Infrared Filter]: https://github.com/jonathantneal/postcss-infrared-filter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-infrared-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-infrared-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-infrared-filter/lists"}