{"id":26952727,"url":"https://github.com/yoyoberenguer/hsv","last_synced_at":"2025-04-03T00:31:06.737Z","repository":{"id":62569533,"uuid":"234050318","full_name":"yoyoberenguer/HSV","owner":"yoyoberenguer","description":"RGB to HSV model conversion","archived":false,"fork":false,"pushed_at":"2021-11-05T17:34:22.000Z","size":1545,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T09:44:56.827Z","etag":null,"topics":["color-conversion","conversion","hsv","hue","saturation","value"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/yoyoberenguer.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-01-15T09:56:35.000Z","updated_at":"2021-11-05T17:34:25.000Z","dependencies_parsed_at":"2022-11-03T17:15:26.333Z","dependency_job_id":null,"html_url":"https://github.com/yoyoberenguer/HSV","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/yoyoberenguer%2FHSV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoyoberenguer%2FHSV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoyoberenguer%2FHSV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoyoberenguer%2FHSV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoyoberenguer","download_url":"https://codeload.github.com/yoyoberenguer/HSV/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916757,"owners_count":20854511,"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-conversion","conversion","hsv","hue","saturation","value"],"created_at":"2025-04-03T00:31:06.026Z","updated_at":"2025-04-03T00:31:06.707Z","avatar_url":"https://github.com/yoyoberenguer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/yoyoberenguer/HSV/blob/master/hue.gif\" width=\"200\"\u003e\n\u003c/p\u003e\n\n\n# HSV project\n\n##  Why installing HSV :\n\nThis library offers fast conversion tools such as `HSV to RGB` and `RGB to HSV`\nported into cython for better performances \n\n \n\n## Project description :\n```\nConversions between color systems (cython library)\nThis module defines bidirectional conversions of color values between colors\nexpressed in the RGB (Red Green Blue) color space used in computer monitors and three\nHSV (Hue Saturation, Value).\n```\n\n## Installation \n```\npip install HSV\n```\n\n## How to?\n```python\nfrom HSV.hsv import rgb_to_hsv, hsv_to_rgb\n\nif __name__ == '__main__':\n    ONE_255 = 1.0 / 255.0\n    r, g, b = 25, 60, 128\n    print(\"\\nOriginal RGB values (R:%s, G:%s, B:%s)\\n\" % (r, g, b))\n    \n    h, s, v = rgb_to_hsv(r * ONE_255, g * ONE_255, b * ONE_255)\n    \n    print(\"HSV values (H:%s, S:%s, V:%s)\" % (h * 360.0, s * 100.0, v * 100.0))\n    \n    r, g, b = hsv_to_rgb(h, s, v)\n    \n    print(\"Retrieved RGB values (R:%s, G:%s, B:%s)\\n\" % (r * 255.0, g * 255.0, b * 255.0))\n```\n\n## Building cython code\n\nIf you need to compile the Cython code after changing the files `hsv.pyx` or `hsv.pxd` or\nthe external C code please proceed as follow:\n```\n1) open a terminal window\n2) Go in the main project directory where (hsv.pyx \u0026 hsv.pxd files are located)\n3) run : python setup_hsv.py build_ext `--inplace`\n\nIf you have to compile the code with a specific python version, make sure\nto reference the right python version in (c:\\python setup_hsv.py build_ext --inplace)\n\nIf the compilation fail, refers to the requirement section and make sure cython\nand a C-compiler are correctly install on your system.\n- A compiler such visual studio, MSVC, CGYWIN setup correctly on your system.\n  - a C compiler for windows (Visual Studio, MinGW etc) install on your system\n  and linked to your windows environment.\n  Note that some adjustment might be needed once a compiler is install on your system,\n  refer to external documentation or tutorial in order to setup this process.\n  e.g https://devblogs.microsoft.com/python/unable-to-find-vcvarsall-bat/\n```\n\n## Credit\n`Yoann Berenguer` \n\n## Dependencies :\n```\ncython \u003e= 0.28\nsetuptools\u003e=49.2.1\n```\n\n## License :\n```\nMIT License\n\nCopyright (c) 2019 Yoann Berenguer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n## Timing :\n\npython\nTest with `1000000` iterations\n```\nThis library\n`rgb_to_hsv` per call 2.22e-07 overall time 0.22196 for 1000000\n`hsv_to_rgb` per call 1.156e-07 overall time 0.11563 for 1000000\n\nColorsys library\n`rgb_to_hsv` per call 9.631e-07 overall time 0.96312 for 1000000\n`hsv_to_rgb` per call 4.587e-07 overall time 0.45866 for 1000000\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoyoberenguer%2Fhsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoyoberenguer%2Fhsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoyoberenguer%2Fhsv/lists"}