{"id":15007923,"url":"https://github.com/matthiasunt/hash-color-material","last_synced_at":"2025-04-15T15:13:23.243Z","repository":{"id":57261565,"uuid":"120317739","full_name":"matthiasunt/hash-color-material","owner":"matthiasunt","description":"Hashes a string or a number to a material color hex code.","archived":false,"fork":false,"pushed_at":"2020-12-14T11:30:33.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T15:13:17.433Z","etag":null,"topics":["color","colors","hash-functions","material-color-hex","material-colors","npm","npm-package"],"latest_commit_sha":null,"homepage":"","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/matthiasunt.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":"2018-02-05T14:45:30.000Z","updated_at":"2024-08-02T01:32:19.000Z","dependencies_parsed_at":"2022-09-11T02:20:36.082Z","dependency_job_id":null,"html_url":"https://github.com/matthiasunt/hash-color-material","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/matthiasunt%2Fhash-color-material","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasunt%2Fhash-color-material/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasunt%2Fhash-color-material/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthiasunt%2Fhash-color-material/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthiasunt","download_url":"https://codeload.github.com/matthiasunt/hash-color-material/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094933,"owners_count":21211837,"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":["color","colors","hash-functions","material-color-hex","material-colors","npm","npm-package"],"created_at":"2024-09-24T19:14:28.918Z","updated_at":"2025-04-15T15:13:23.223Z","avatar_url":"https://github.com/matthiasunt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hash-color-material\nHashes a string or a number to a [material color](https://material.io/guidelines/style/color.html#color-color-palette) hex code.\n\n## Get started\nFirst:\n```\nnpm install hash-color-material\n```\nThen:\n```\nvar hashColor = require('hash-color-material');\nconsole.log(hashColor.getColorFromString('Hello world!'));\n```\n## Usage\n```\nhashColor.getColorFromString('Hello world!');\n```\nThe result is: `#039BE5`\n\n## Functions\n```\nhashColor.getColorFromString(str, darkColors, accentColors)\n```\nHashes the passed string to a material color hex code.\n* `str` (string): The string which gets hashed to a material color hex code\n* `darkColors` (boolean): Whether to include brown, grey and blue-grey (optional, default: true)\n* `accentColors` (boolean): Whether to include accent colors (optional, default: true)\n\n```\nhashColor.getColorFromNumber(number, darkColors, accentColors)\n```\nHashes the passed string to a material color hex code.\n* `number` (number): The number which gets hashed to a material color hex code\n* `darkColors` (boolean): Whether to include brown, grey and blue-grey (optional, default: true)\n* `accentColors` (boolean): Whether to include accent colors (optional, default: true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthiasunt%2Fhash-color-material","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthiasunt%2Fhash-color-material","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthiasunt%2Fhash-color-material/lists"}