{"id":16591093,"url":"https://github.com/alex-page/a11ycolor","last_synced_at":"2025-03-21T13:31:23.148Z","repository":{"id":27261302,"uuid":"113007884","full_name":"alex-page/a11ycolor","owner":"alex-page","description":"🌈 Generate the nearest accessible color","archived":false,"fork":false,"pushed_at":"2023-07-20T02:39:45.000Z","size":763,"stargazers_count":36,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-12T23:15:20.078Z","etag":null,"topics":["a11y","accessibility","color","contrast","contrast-ratio","javascript","npm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/a11ycolor","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/alex-page.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-04T07:08:51.000Z","updated_at":"2024-08-30T17:26:14.000Z","dependencies_parsed_at":"2024-06-20T00:02:07.582Z","dependency_job_id":null,"html_url":"https://github.com/alex-page/a11ycolor","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-page%2Fa11ycolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-page%2Fa11ycolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-page%2Fa11ycolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-page%2Fa11ycolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex-page","download_url":"https://codeload.github.com/alex-page/a11ycolor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221815594,"owners_count":16885184,"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","accessibility","color","contrast","contrast-ratio","javascript","npm"],"created_at":"2024-10-11T23:15:21.374Z","updated_at":"2024-10-28T10:12:10.893Z","avatar_url":"https://github.com/alex-page.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌈 A11yColor\n\n\u003e Generate the nearest accessible color.\n\n## Install\n\n```console\n$ npm install a11ycolor\n```\n\n## Usage\n\n```js\nconst a11yColor = require('a11ycolor');\n\na11yColor(red, blue); // This returns #FFA3A3\n```\n\n## Parameters\n\nThe function `a11yColor` function takes three parameters:\n\n```js\na11yColor($toMakeA11y, $background, ($ratioKey = 'small'));\n```\n\n1. `toMakeA11y` - The color that is to be made accessible on the background\n1. `background` - The background color to for the contrast\n1. `ratioKey` - The keyword 'small' ( 4.5 ) or 'large' ( 3.0 ) for the WCAG 2.1 contrast ratio\n\n## Release History\n\n- v2.0.9 - Update GitHub action to use yml syntax\n- v2.0.8 - Update dependencies\n- v2.0.7 - Update dependencies\n- v2.0.6 - Replace `eslint` with `xo`, adjust formatting\n- v2.0.5 - Use files instead of `.npmignore`\n- v2.0.4 - Remove `prepublishOnly` script\n- v2.0.3 - Remove travis badge from README.md\n- v2.0.2 - Replace travis with GitHub actions\n- v2.0.1 - Updating readme, fixing bug when white and black passes\n- v2.0.0 - Binary search, removing steps, adding eslint\n- v1.1.0 - Fixing bugs that caused the contrast to be off by 0.2\n- v1.0.7 - Adding travis\n- v1.0.6 - Minimizing the files\n- v1.0.5 - Removing babel\n- v1.0.4 - Updating documentation\n- v1.0.3 - Making import work\n- v1.0.2 - Removing unecessary NPM packages\n- v1.0.1 - Adding readme\n- v1.0.0 - First release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-page%2Fa11ycolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-page%2Fa11ycolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-page%2Fa11ycolor/lists"}