{"id":26633737,"url":"https://github.com/corygibbons/iromi","last_synced_at":"2025-04-10T17:38:02.500Z","repository":{"id":57276862,"uuid":"76431181","full_name":"corygibbons/iromi","owner":"corygibbons","description":" 🎨 WIP — Collection of JS colour functions that automate the selection of beautiful, accessible colours.","archived":false,"fork":false,"pushed_at":"2018-03-06T07:37:12.000Z","size":161,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T15:16:20.697Z","etag":null,"topics":["a11y","accessible-colours","color","colour","colours","js","wcag"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corygibbons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-14T06:23:17.000Z","updated_at":"2019-12-06T04:27:26.000Z","dependencies_parsed_at":"2022-09-16T09:50:23.912Z","dependency_job_id":null,"html_url":"https://github.com/corygibbons/iromi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corygibbons%2Firomi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corygibbons%2Firomi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corygibbons%2Firomi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corygibbons%2Firomi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corygibbons","download_url":"https://codeload.github.com/corygibbons/iromi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248262044,"owners_count":21074238,"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":["a11y","accessible-colours","color","colour","colours","js","wcag"],"created_at":"2025-03-24T15:16:35.395Z","updated_at":"2025-04-10T17:38:02.486Z","avatar_url":"https://github.com/corygibbons.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iromi\n\nIromi is a collection of JS colour functions that automate the selection of beautiful, accessible colours.\n\n[![npm version](https://img.shields.io/npm/v/iromi.svg?style=flat-square)](https://www.npmjs.com/package/iromi)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n## Install\n\n```\n$ npm install iromi --save\n```\n\n## Functions\n\n#### `iromi.type(backgroundColor, contrast, size)`\n\n* **`backgroundColor`**:\n  * Valid colour string (`#ffffff`, `rgb(0,0,0)`)\n* **`contrast`**:\n  * `'default'`: AA compliant\n  * `'more'`: AAA compliant\n  * `'less`: Not compliant\n* **`size`**:\n  * `'small'`\n  * `'large'`\n\n```js\nconst iromi = require('iromi');\n\n// Will return a text colour that is AA compliant on #ffffff\ntextOnWhiteBg = iromi.type('#ffffff');\n\n// Will return a text colour is AA compliant on #000000\ntextOnBlackBg = iromi.type('#000000');\n\n// Iromi will try to return an AA compliant text colour if no contrast argument\n// is given. The following will try to return an AAA compliant text colour.\ntextOnWhiteBgAAA = iromi.type('#ffffff', 'more');\n\n// Since Iromi returns a tinycolor object it's easy to choose your format\ntextOnWhiteBg.toHexString(); // '#727272'\ntextOnWhiteBg.toRgbString(); // 'rgb(115, 115, 115)'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorygibbons%2Firomi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorygibbons%2Firomi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorygibbons%2Firomi/lists"}