{"id":42003830,"url":"https://github.com/shchilkin/color-processing-library","last_synced_at":"2026-01-26T01:35:37.900Z","repository":{"id":44208294,"uuid":"272663971","full_name":"shchilkin/color-processing-library","owner":"shchilkin","description":"A small JS library for color processing","archived":false,"fork":false,"pushed_at":"2022-12-30T20:38:30.000Z","size":67,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-27T15:54:11.781Z","etag":null,"topics":["color-processing","colors","hex","rgb"],"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/shchilkin.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":"2020-06-16T09:19:18.000Z","updated_at":"2023-03-17T12:26:03.000Z","dependencies_parsed_at":"2023-01-31T16:05:12.231Z","dependency_job_id":null,"html_url":"https://github.com/shchilkin/color-processing-library","commit_stats":null,"previous_names":["soft-ui-generator/color-processing-library"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/shchilkin/color-processing-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchilkin%2Fcolor-processing-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchilkin%2Fcolor-processing-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchilkin%2Fcolor-processing-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchilkin%2Fcolor-processing-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shchilkin","download_url":"https://codeload.github.com/shchilkin/color-processing-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchilkin%2Fcolor-processing-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28764010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T00:37:26.264Z","status":"ssl_error","status_checked_at":"2026-01-26T00:37:25.959Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-processing","colors","hex","rgb"],"created_at":"2026-01-26T01:35:37.760Z","updated_at":"2026-01-26T01:35:37.894Z","avatar_url":"https://github.com/shchilkin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Soft UI color processing\nA small javascript library for color processing. \n\n`color-processing-library` is available on [npm](https://www.npmjs.com/package/color-processing-library). To install it, type:\n\n    npm i color-processing-library\n    \nFunctionality\nImport example: \n```javascript\nimport * as colorProcessing from 'color-processing-library'  \n```\nFuncitons\n`toHex(number)` - The function converts decimal number to hexadecimal value\n\u003eExample\n```javascript\ntoHex(255) // returns 'FF' \ntoHex(0) // returns '00'\n```\n`calculateColor(colorValue, factor)` - The function calculates a new color value in percent of the initial color\n\u003eExample\n```javascript\ncalculateColor(225, 85) // returns 191\ncalculateColor(89, 120) // returns 107\n```\n`getFontColor(red, green, blue)` - The function calculates and returns either black or white hexadecimal color code depending on the color input\n\u003eExamples\n```javascript\nlet red, green, blue = 240;\ngetFontColor(red, green, blue) // returns '#000'\n```\n```javascript\nlet red, green, blue = 30;\ngetFontColor(red, green, blue) // returns '#FFF'\n```\n`getFontColorHex(hexColor)` - The function calculates and returns either black or white hexadecimal color code depend on the color input | input - Hexadecimal color code\n\u003eExample\n```javascript\ngetFontColorHex('#F0F0F0') // returns '#000'\ngetFontColorHex('#303030') // returns '#FFF'\n```\n`hexToRGB(hexColor)` - The function converts hexadecimal color code to rgb\n\u003eExample\n```javascript\nhexToRGB('#ED2939') // returns { Red:237, Green:41, Blue:57 }\nhexToRGB() // returns \"Invalid Hex code value\"\n```\n`isHexColorValid(hexColor)` - The function validates hexadecimal color and returns either true or false\n\u003eExample\n```javascript\nisHexColorValid('#ED2939') // returns true\nisHexColorValid('#Helloo') // returns false\n```\n`getTintsAndShades(red, green, blue, factor, outputMode)` - The function returns new color in % of input color as hex or rgb\n\u003eExample\n```javascript\ngetTintsAndShades(255, 255, 255, 85, 'rgb') // returns 'rgb(217,217,217)'\ngetTintsAndShades(255, 255, 255, 85, 'hex') // returns '#D9D9D9'\n\n```\n`invertFontColor(hexColor)` - Function returns opposite color\n\u003e ❗️Note This function currently works only with black and white hex values \n\n\u003eExample\n```javascript\ngetTintsAndShades(\"#000\") // returns '#FFF'\n```\n`getHarmonyColor(color, mode)` - Function returns a harmony color depend on a mode\n\u003e ❗ ️Note This function currently works only in complementary mode\n\n\u003eExample\n```javascript\ngetHarmonyColor(\"#ED2939\", 'complementary') // returns '#12D6C6'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchilkin%2Fcolor-processing-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshchilkin%2Fcolor-processing-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchilkin%2Fcolor-processing-library/lists"}