{"id":13538208,"url":"https://github.com/bukinoshita/random-gradient","last_synced_at":"2025-03-15T10:30:55.033Z","repository":{"id":21666663,"uuid":"93560803","full_name":"bukinoshita/random-gradient","owner":"bukinoshita","description":"Generate beautiful random gradients","archived":false,"fork":false,"pushed_at":"2023-01-03T18:28:11.000Z","size":462,"stargazers_count":72,"open_issues_count":13,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T00:05:02.022Z","etag":null,"topics":["gradient","javascript","nodejs"],"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/bukinoshita.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":"2017-06-06T20:27:07.000Z","updated_at":"2024-12-15T21:35:22.000Z","dependencies_parsed_at":"2023-01-11T21:18:30.933Z","dependency_job_id":null,"html_url":"https://github.com/bukinoshita/random-gradient","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Frandom-gradient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Frandom-gradient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Frandom-gradient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Frandom-gradient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bukinoshita","download_url":"https://codeload.github.com/bukinoshita/random-gradient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243718804,"owners_count":20336589,"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":["gradient","javascript","nodejs"],"created_at":"2024-08-01T09:01:07.924Z","updated_at":"2025-03-15T10:30:54.746Z","avatar_url":"https://github.com/bukinoshita.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# random-gradient [![Build Status](https://travis-ci.org/bukinoshita/random-gradient.svg?branch=master)](https://travis-ci.org/bukinoshita/random-gradient)\n\n\u003e Generate beautiful random gradients\n\n\u003cbr/\u003e\n\u003cimg src=\"https://cldup.com/S4sruO8J60.png\" width=\"600\"/\u003e\n\n## Install\n```\n$ npm install --save random-gradient\n```\n\n## Usage\n```js\n// with React\n\nimport gradient from 'random-gradient'\n\nexport default ({ name }) =\u003e {\n  const bgGradient = { background: gradient(name) }\n\n  return (\n    \u003cdiv style={bgGradient}\u003e\n      \u003ch2\u003e{name}\u003c/h2\u003e\n    \u003c/div\u003e\n  )\n}\n\n// with Vue\n\nimport gradient from 'random-gradient'\n\nVue.directive('random-gradient', {\n    inserted: function (el) {\n        // Using the element's \"title\" attribute, e.g.\n        el.style.backgroundImage = gradient(el.title);\n    }\n});\n```\n\n## API\n### randomGradient(uid, type)\n\n#### uid\nType: `string`\u003cbr/\u003e\nRequired\n\n#### type\nType: `string`\u003cbr/\u003e\nDefault: `diagonal`\u003cbr/\u003e\nOptions: `diagonal`, `vertical`, `horizontal`, `radial`\u003cbr/\u003e\n\n## Related\n\n- [hash-avatar](https://github.com/bukinoshita/hash-avatar) — :rainbow: Hash avatar algorithm\n- [react-hash-avatar](https://github.com/bukinoshita/react-hash-avatar) — React hash avatar algorithm\n\n## License\n[MIT](https://github.com/bukinoshita/random-gradient/blob/master/LICENSE) \u0026copy; Bu Kinoshita\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbukinoshita%2Frandom-gradient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbukinoshita%2Frandom-gradient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbukinoshita%2Frandom-gradient/lists"}