{"id":15394399,"url":"https://github.com/xyproto/color","last_synced_at":"2025-07-28T19:04:25.922Z","repository":{"id":20113761,"uuid":"23383538","full_name":"xyproto/color","owner":"xyproto","description":"HSB \u003c-\u003e RGB color conversion","archived":false,"fork":false,"pushed_at":"2018-05-21T21:08:54.000Z","size":608,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T11:32:48.188Z","etag":null,"topics":["color","convert","hsb","hsv","rgb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"psychogenic/xively-js","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyproto.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":"2014-08-27T09:07:16.000Z","updated_at":"2019-04-05T07:38:24.000Z","dependencies_parsed_at":"2022-07-21T19:48:40.282Z","dependency_job_id":null,"html_url":"https://github.com/xyproto/color","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xyproto/color","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fcolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fcolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fcolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fcolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/color/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fcolor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267569126,"owners_count":24109015,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","convert","hsb","hsv","rgb"],"created_at":"2024-10-01T15:23:29.220Z","updated_at":"2025-07-28T19:04:25.811Z","avatar_url":"https://github.com/xyproto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# color\n\nA package for converting from RGB to HSB and back.\n\n* HSB stands for Hue, Saturation and Brightness\n* RGB stands for Red, Green and Blue\n\n## Example usage\n\n![example](img/hue.png)\n\nThe above image was generated by the following program:\n\n```go\npackage main\n\nimport (\n\thbscolor \"github.com/xyproto/color\"\n\t\"image\"\n\t\"image/png\"\n\t\"os\"\n)\n\nconst (\n\tw = 512\n\th = 512\n)\n\nfunc main() {\n\t// Prepare an image surface\n\tsurface := image.NewRGBA(image.Rectangle{image.Point{0, 0}, image.Point{w, h}})\n\n\t// Generate an image that shows a smooth transition over all 360 degrees of hues\n\tfor y := 0; y \u003c h; y++ {\n\t\tfor x := 0; x \u003c w; x++ {\n\t\t\tc := hbscolor.NewFromFloats(float64(x)/float64(w), float64(y)/float64(h), float64(y)/float64(h), 1.0).RGBA()\n\t\t\tsurface.Set(x, y, c)\n\t\t}\n\t}\n\n\t// Prepare the image file\n\timageFile, err := os.Create(\"output.png\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer imageFile.Close()\n\n\t// Write the surface to file, as a PNG image\n\tpng.Encode(imageFile, surface)\n}\n```\n\n# General info\n\n* License: MIT\n* Version: 1.0\n* Author: Alexander F Rødseth \u0026lt;xyproto@archlinux.org\u0026gt;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fcolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fcolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fcolor/lists"}