{"id":13392858,"url":"https://github.com/andyli/hxColorToolkit","last_synced_at":"2025-03-13T19:31:07.345Z","repository":{"id":921926,"uuid":"686452","full_name":"andyli/hxColorToolkit","owner":"andyli","description":"Haxe library for color conversion and color scheme generation.","archived":false,"fork":false,"pushed_at":"2022-07-30T03:20:16.000Z","size":119,"stargazers_count":45,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-02T01:28:53.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andyli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-26T01:37:29.000Z","updated_at":"2024-04-02T17:40:42.000Z","dependencies_parsed_at":"2022-08-16T11:30:18.635Z","dependency_job_id":null,"html_url":"https://github.com/andyli/hxColorToolkit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyli%2FhxColorToolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyli%2FhxColorToolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyli%2FhxColorToolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyli%2FhxColorToolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyli","download_url":"https://codeload.github.com/andyli/hxColorToolkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243469122,"owners_count":20295691,"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":[],"created_at":"2024-07-30T17:00:38.249Z","updated_at":"2025-03-13T19:31:07.029Z","avatar_url":"https://github.com/andyli.png","language":"Haxe","funding_links":[],"categories":["Uncategorized","Libraries"],"sub_categories":["Uncategorized","Haxe"],"readme":"# hxColorToolkit\n\n[![Build Status](https://travis-ci.org/andyli/hxColorToolkit.svg?branch=master)](https://travis-ci.org/andyli/hxColorToolkit)\n\nA Haxe library for color conversion and color scheme generation. \n\nIt is based on [colortoolkit](http://code.google.com/p/colortoolkit/) with lots of bug fixs and enhancements.\n\n## Usage\n\nInstall it from haxelib: `haxelib install hxColorToolkit`\n\n```haxe\nusing hxColorToolkit.ColorToolkit;\n\nvar hexColor = 0x112233.toHex();\ntrace(hexColor.red); //0x11\ntrace(hexColor.green); //0x22\ntrace(hexColor.blue); //0x33\n\nvar hslColor = new hxColorToolkit.spaces.HSL(0, 100, 50); //construct a color in HSL space\ntrace(hslColor.getColor()); //0xFF0000 the hex color value\n```\n\n## Color spaces\n\nThey can be found inside the package `hxColorToolkit.spaces`. All of them implement the interface `hxColorToolkit.spaces.Color`.\n\n* `CMYK` 4-channel [CMYK](http://en.wikipedia.org/wiki/CMYK_color_model) color space with each channel in [0,100].\n* `Gray` A single channel gray-scale color in [0,255]. Any color given will be converted to gray-scale.\n* `Hex` A simple wrapper of color value in hex(eg. `0xFFFFCCCC`). Its `alpha`, `red`, `green`, `blue` extract the corresponding value to `Int`.\n* `HSB` 3-channel [HSB](http://en.wikipedia.org/wiki/HSL_and_HSV) color space with ranges [0,360), [0,100], [0,100].\n* `HSL` 3-channel [HSL](http://en.wikipedia.org/wiki/HSL_and_HSV) color space with ranges [0,360), [0,100], [0,100].\n* `Lab` 3-channel [Lab](http://en.wikipedia.org/wiki/Lab_color_space) color space with ranges [0,100], [-128,127], [-128,127].\n* `RGB` Normal 3-channel [RGB](http://en.wikipedia.org/wiki/RGB_color_space) color space with each channel in [0,255]. Unlike `Hex`, its properties(`red`, `green`, `blue`) are stored as `Float` for precise calculation.\n* `ARGB` 4-channel ARGB color space with each channel in [0,255]. It is a sub-class of `RGB` with an additional `alpha` value that defaults to 255.\n* `XYZ` 3-channel [XYZ](http://en.wikipedia.org/wiki/CIE_1931_color_space) color space with ranges [0,95.047], [0,100], [0,108.883].\n* `YUV` 3-channel [YUV](http://en.wikipedia.org/wiki/YUV) color space with each channel in [0,255].\n\nAll channel values are clamped to their possible min/max, except hue values of `HSB` and `HSL` are looped inside 0-360 (`color.hue = -10; trace(color.hue); //350`).\n\n## Color schemes\n\nColor scheme is basically a set of colors, constructed according to [color theory](http://en.wikipedia.org/wiki/Color_theory).\n\nThe classes can be found inside the package `hxColorToolkit.schemes`. All of them implement the interface `hxColorToolkit.schemes.ColorScheme`.\n\n* `Analogous`\n* `Complementary`\n* `Compound`\n* `FlippedCompound`\n* `Monochrome`\n* `SplitComplementary`\n* `Tetrad`\n* `Triad`\n\n## License\n\n### hxColorToolkit\n\n```\nThe MIT License\n\nCopyright (c) 2010-2016 Andy Li http://www.onthewings.net/\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n\n### colortoolkit\n\n```\nThe MIT License\n\nCopyright (c) 2009 P.J. Onori (pj@somerandomdude.com)\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\nall copies 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\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyli%2FhxColorToolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyli%2FhxColorToolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyli%2FhxColorToolkit/lists"}