{"id":16226179,"url":"https://github.com/ghostdevv/sass-hex-rgb","last_synced_at":"2025-04-08T03:46:02.141Z","repository":{"id":42370613,"uuid":"413075518","full_name":"ghostdevv/sass-hex-rgb","owner":"ghostdevv","description":"A util for converting hex values to rgb (e.g. #302def -\u003e 48, 45, 239)","archived":false,"fork":false,"pushed_at":"2024-06-17T06:18:59.000Z","size":122,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T09:48:43.060Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"SCSS","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/ghostdevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"ghostdevv","patreon":"onlyspaceghost","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://ghostdev.xyz/donate"}},"created_at":"2021-10-03T12:46:57.000Z","updated_at":"2024-11-25T16:30:59.000Z","dependencies_parsed_at":"2023-01-18T06:01:10.661Z","dependency_job_id":null,"html_url":"https://github.com/ghostdevv/sass-hex-rgb","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/ghostdevv%2Fsass-hex-rgb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fsass-hex-rgb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fsass-hex-rgb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fsass-hex-rgb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostdevv","download_url":"https://codeload.github.com/ghostdevv/sass-hex-rgb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773744,"owners_count":20993633,"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":["hacktoberfest"],"created_at":"2024-10-10T12:48:22.826Z","updated_at":"2025-04-08T03:46:02.074Z","avatar_url":"https://github.com/ghostdevv.png","language":"SCSS","funding_links":["https://github.com/sponsors/ghostdevv","https://patreon.com/onlyspaceghost","https://ghostdev.xyz/donate"],"categories":[],"sub_categories":[],"readme":"# Sass Hex (to) RGB\n\n\u003e This package is compatible with both SASS and SCSS\n\nA way to convert hex values to rgb in sass. The main reason this package exists is to get raw rgb values (e.g. 255, 255, 255) instead of a rgb value wrapped in a function. We also include functions to convert to rgb and rgba.\n\n\n# Using\n```scss\n@use 'sass-hex-rgb' as rgb;\n```\n\n\u003e Note: depending on how you resolve your sass imports you might need to import from the `node_modules` folder directly, e.g. `./node_modules/sass-hex-rgb`\n\n# Functions\n\n-   `toValues($colour)`\n    ```scss\n    $red: #f45333;\n    $redRGB: rgb.toValues($red); // \"244, 83, 51\"\n    ```\n\n-   `toRGB($colour)`\n    ```scss\n    $red: rgb.toRGB(#f45333);\n    ```\n\n-   `toRGBA($colour)`\n    ```scss\n    $redAlpha: rgb.toRGBA(#f45333, $alpha: 0.5); // rgba(244, 83, 51, 0.5);\n    ```\n\n\u003e Note: I wanted to add `fromValues` as a function, but was unable to as the overhead of splitting the values and converting to a number is large. If anyone has a better idea please submit a [pr](https://github.com/ghostdevv/sass-hex-rgb/pulls)\n\n# Support\n-   Join the [discord](https://discord.gg/2Vd4wAjJnm)\u003cbr\u003e\n-   Create a issue on the [github](https://github.com/ghostdevv/sass-hex-rgb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Fsass-hex-rgb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostdevv%2Fsass-hex-rgb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Fsass-hex-rgb/lists"}