{"_id":"@brybrant/sass-okhsv-okhsl","_rev":"3-bd84d964a875edb124f0fbf7e9e3f747","name":"@brybrant/sass-okhsv-okhsl","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@brybrant/sass-okhsv-okhsl","version":"1.0.0","keywords":["OkHSV","OkHSL"],"author":{"name":"brybrant"},"license":"MIT","_id":"@brybrant/sass-okhsv-okhsl@1.0.0","maintainers":[{"name":"brybrant","email":"brybrant@gmail.com"}],"homepage":"https://github.com/brybrant/sass-okhsv-okhsl#readme","bugs":{"url":"https://github.com/brybrant/sass-okhsv-okhsl/issues"},"dist":{"shasum":"d1f0d4b40c3b69b2e7b3826b1116e113bdcb6174","tarball":"https://registry.npmjs.org/@brybrant/sass-okhsv-okhsl/-/sass-okhsv-okhsl-1.0.0.tgz","fileCount":5,"integrity":"sha512-7fqbl5ljYZdrc3Kes68nZAg6RPLlV7V+sV1lttzIOXBywJzgLsN3TDpoiWbz4piQRg0sRMI4k5TWU1PyGcFuhg==","signatures":[{"sig":"MEYCIQDsn96gdtoFwWCLhXwWDH0svD33gE3gjX9yrqKRvYwE7QIhANrM+5Evj57OtOAcl/o4F8sVV2ZLVUO3h9nTj21dK+5r","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17456},"gitHead":"8a8bae2f88243f07bc0ac27724998ec3ba682bf1","_npmUser":{"name":"brybrant","email":"brybrant@gmail.com"},"repository":{"url":"git+https://github.com/brybrant/sass-okhsv-okhsl.git","type":"git"},"_npmVersion":"10.7.0","description":"Sass functions to convert OkHSV and OkHSL to sRGB","directories":{},"_nodeVersion":"18.20.4","_hasShrinkwrap":false,"peerDependencies":{"sass":">1.32.0"},"peerDependenciesMeta":{"sass":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sass-okhsv-okhsl_1.0.0_1726597356013_0.1790820352233391","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@brybrant/sass-okhsv-okhsl","version":"1.0.1","keywords":["OkHSV","OkHSL"],"author":{"name":"brybrant"},"license":"MIT","_id":"@brybrant/sass-okhsv-okhsl@1.0.1","maintainers":[{"name":"brybrant","email":"brybrant@gmail.com"}],"homepage":"https://github.com/brybrant/sass-okhsv-okhsl#readme","bugs":{"url":"https://github.com/brybrant/sass-okhsv-okhsl/issues"},"dist":{"shasum":"f423fd3f7fe5efa699ea77adbc5e68ecb7c9de29","tarball":"https://registry.npmjs.org/@brybrant/sass-okhsv-okhsl/-/sass-okhsv-okhsl-1.0.1.tgz","fileCount":5,"integrity":"sha512-8W5Gj1FZaRMf3M498ggPV98xBgxj+30ALbanqTeMXlaMp4ry66ltUuvOqIFWOw2NF5C0fMOZ42b04nTwJxJSeA==","signatures":[{"sig":"MEUCIQDtQsAv6d1+kh+zzvxVRh86tWkJ7QfHYAv7coJGr5TtigIgTHPMiyoqzxY0577mTRwviV0K5y6UOyEnn1HA2v8o+Q8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17645},"exports":{".":{"sass":"./_index.scss"}},"gitHead":"4d03d2943c166adc939ea18221353f9ce4738135","_npmUser":{"name":"brybrant","actor":{"name":"brybrant","type":"user","email":"brybrant@gmail.com"},"email":"brybrant@gmail.com"},"repository":{"url":"git+https://github.com/brybrant/sass-okhsv-okhsl.git","type":"git"},"_npmVersion":"10.8.2","description":"Sass functions to convert OkHSV and OkHSL to sRGB","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"peerDependencies":{"sass":">1.32.0"},"peerDependenciesMeta":{"sass":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sass-okhsv-okhsl_1.0.1_1751889453225_0.6648913393973879","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@brybrant/sass-okhsv-okhsl","description":"Sass functions to convert OkHSV and OkHSL to sRGB","keywords":["OkHSV","OkHSL"],"author":{"name":"brybrant"},"license":"MIT","version":"1.1.0","exports":{".":{"sass":"./_index.scss"}},"repository":{"type":"git","url":"git+https://github.com/brybrant/sass-okhsv-okhsl.git"},"peerDependencies":{"sass":">1.32.0"},"peerDependenciesMeta":{"sass":{"optional":true}},"_id":"@brybrant/sass-okhsv-okhsl@1.1.0","gitHead":"31f3c0f258be7e6a19575dd06b063027fe74ff43","bugs":{"url":"https://github.com/brybrant/sass-okhsv-okhsl/issues"},"homepage":"https://github.com/brybrant/sass-okhsv-okhsl#readme","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-R4BBW29PY706W689cwiQwHVxwa4zB1nHD+zkEz6b2uJs+iSxjCXSVa0WGnlWv3yYmepY3ipWvPCV0yh9dbPgug==","shasum":"2a990a6487ffb33818282a1ed156fc79240a3fd9","tarball":"https://registry.npmjs.org/@brybrant/sass-okhsv-okhsl/-/sass-okhsv-okhsl-1.1.0.tgz","fileCount":5,"unpackedSize":18541,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBMeKyu6KHAp0CvEnxMiNVUC4jDen9RJKI4Z4jYFIUGRAiEAyDupfkj57DJXfCIs7HfqRcHtl0b93QSVQqtC/K2NrqI="}]},"_npmUser":{"name":"brybrant","email":"brybrant@gmail.com"},"directories":{},"maintainers":[{"name":"brybrant","email":"brybrant@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sass-okhsv-okhsl_1.1.0_1771927540307_0.3037378190029283"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-17T18:22:35.905Z","modified":"2026-02-24T10:05:40.621Z","1.0.0":"2024-09-17T18:22:36.242Z","1.0.1":"2025-07-07T11:57:33.378Z","1.1.0":"2026-02-24T10:05:40.460Z"},"bugs":{"url":"https://github.com/brybrant/sass-okhsv-okhsl/issues"},"author":{"name":"brybrant"},"license":"MIT","homepage":"https://github.com/brybrant/sass-okhsv-okhsl#readme","keywords":["OkHSV","OkHSL"],"repository":{"type":"git","url":"git+https://github.com/brybrant/sass-okhsv-okhsl.git"},"description":"Sass functions to convert OkHSV and OkHSL to sRGB","maintainers":[{"name":"brybrant","email":"brybrant@gmail.com"}],"readme":"# OkHSV / OkHSL to RGB Sass Functions\r\n\r\n[<img src='https://img.shields.io/npm/v/%40brybrant%2Fsass-okhsv-okhsl'>](https://www.npmjs.com/package/@brybrant/sass-okhsv-okhsl)\r\n\r\nSass functions to convert OkHSV and OkHSL to sRGB.\r\n\r\nCredit to [Björn Ottosson](https://bottosson.github.io/posts/colorpicker/)\r\n\r\n## Install\r\n\r\n```bash\r\n$ npm i -D @brybrant/sass-okhsv-okhsl\r\n```\r\n\r\n## Setup\r\n\r\n```scss\r\n@use 'pkg:@brybrant/sass-okhsv-okhsl' as convert;\r\n\r\n$red: convert.okhsv_to_rgba(29deg, 100%, 100%); // rgb(255, 0, 4)\r\n\r\n$blue: convert.okhsl_to_rgba(265, 100%, 0.37); // rgb(14, 3, 255)\r\n\r\n$blue_hex: convert.color_to_hex($blue); // #0E03FF\r\n```\r\n\r\n## Functions\r\n\r\n### `okhsv_to_rgba( $hue, $saturation, $value, $alpha )`\r\n\r\n  Converts **OkHSV** color space to sRGB color space.\r\n\r\n  - #### `$hue`\r\n    A [`number`](https://mdn.io/css_number) or an [`angle`](https://mdn.io/angle) representing the color's [`hue`](https://mdn.io/hue) angle in **OkHSV** color space.\\\r\n    &#9642; Default: `0deg`\r\n\r\n  - #### `$saturation`\r\n    A float (between 0 and 1) or [`percentage`](https://mdn.io/percentage) representing the color's saturation.\\\r\n    `1` or `100%` is completely saturated, while `0` is completely unsaturated (gray).\\\r\n    &#9642; Default: `1`\r\n\r\n  - #### `$value`\r\n    A float (between 0 and 1) or [`percentage`](https://mdn.io/percentage) representing the color's brightness.\\\r\n    `1` or `100%` is completely bright, while `0` is completely black.\\\r\n    &#9642; Default: `1`\r\n\r\n  - #### `$alpha`\r\n    An [`alpha value`](https://mdn.io/alpha-value) representing the color's transparency.\\\r\n    `1` or `100%` is completely opaque, while `0` is completely transparent.\\\r\n    &#9642; Default: `1`\r\n\r\n  #### Usage example\r\n\r\n  ```scss\r\n  @debug okhsv_to_rgba(29deg, 1, 100%); // rgb(255, 0, 4)\r\n\r\n  @debug okhsv_to_rgba($hue: 170); // rgb(0, 255, 201)\r\n  ```\r\n___\r\n\r\n### `okhsl_to_rgba( $hue, $saturation, $lightness, $alpha )`\r\n\r\n  Converts **OkHSL** color space to sRGB color space.\r\n\r\n  - #### `$hue`\r\n    A [`number`](https://mdn.io/css_number) or an [`angle`](https://mdn.io/angle) representing the color's [`hue`](https://mdn.io/hue) angle in **OkHSL** color space.\\\r\n    &#9642; Default: `0deg`\r\n\r\n  - #### `$saturation`\r\n    A float (between 0 and 1) or [`percentage`](https://mdn.io/percentage) representing the color's saturation.\\\r\n    `1` or `100%` is completely saturated, while `0` is completely unsaturated (gray).\\\r\n    &#9642; Default: `1`\r\n\r\n  - #### `$lightness`\r\n    A float (between 0 and 1) or [`percentage`](https://mdn.io/percentage) representing the color's lightness.\\\r\n    `1` or `100%` is white, `0` is black, and `0.5` or `50%` is \"normal\".\\\r\n    &#9642; Default: `0.5`\r\n\r\n  - #### `$alpha`\r\n    An [`alpha value`](https://mdn.io/alpha-value) representing the color's transparency.\\\r\n    `1` or `100%` is completely opaque, while `0` is completely transparent.\\\r\n    &#9642; Default: `1`\r\n\r\n  #### Usage example\r\n\r\n  ```scss\r\n  @debug okhsl_to_rgba(265, 100%, 0.37); // rgb(14, 3, 255)\r\n\r\n  @debug okhsl_to_rgba($lightness: 40%); // rgb(172, 0, 89)\r\n  ```\r\n___\r\n\r\n### `color_to_hex( $color )`\r\n\r\n  Converts any color to [hexadecimal](https://mdn.io/hex-color) format.\r\n\r\n  - #### `$color`\r\n    Any valid [CSS color](https://mdn.io/color_value) (rgb, hsl, etc.)\r\n\r\n  #### Usage example\r\n\r\n  ```scss\r\n  @debug color_to_hex(okhsv_to_rgba(143deg, 1, 1, 0.5)); // #00FF1F80\r\n\r\n  @debug color_to_hex(rgb(0 255 31 / 0.5)); // #00FF1F80\r\n  ```\r\n","readmeFilename":"README.md"}