{"id":17146041,"url":"https://github.com/emersion/jalette","last_synced_at":"2025-03-24T10:25:29.038Z","repository":{"id":19207421,"uuid":"22441163","full_name":"emersion/jalette","owner":"emersion","description":"A step-by-step palette generator written in Javascript","archived":false,"fork":false,"pushed_at":"2017-05-14T14:59:33.000Z","size":22,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T05:12:39.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sous-chefs/graphite","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emersion.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-07-30T19:09:49.000Z","updated_at":"2021-10-06T04:02:39.000Z","dependencies_parsed_at":"2022-07-10T07:46:08.622Z","dependency_job_id":null,"html_url":"https://github.com/emersion/jalette","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fjalette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fjalette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fjalette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fjalette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emersion","download_url":"https://codeload.github.com/emersion/jalette/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245250812,"owners_count":20584789,"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-10-14T21:07:40.178Z","updated_at":"2025-03-24T10:25:29.010Z","avatar_url":"https://github.com/emersion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Jalette\n=======\n\nA step-by-step palette generator written in Javascript.\n\nSome generators already exist, and this one is certainly not the best, but Jalette's goal is to provide dynamic palette generation : you have an existing palette and you want to add more colors to this palette. Newly generated colors are the farest as possible from the current palette's colors.\n\nJalette uses the [CIELAB](http://en.wikipedia.org/wiki/CIELAB) color space, which is intended to mimic the nonlinear response of the eye. Distances between colors are computed using the [CIEDE2000](http://en.wikipedia.org/wiki/Color_difference#CIEDE2000) formula.\n\nYou can find a live demo here: http://cdn.rawgit.com/emersion/jalette/master/index.html\n\nDocs\n====\n\nAvailable classes:\n* `new jalette.Rgb(r, g, b)`: an RGB color\n  * `toString()`: converts to a string, e.g. `rgb(42, 42, 42)`. You can use it in CSS for instance.\n  * `toHex()`: converts to the hexadecimal value, e.g. `#ffffff`.\n  * `isValid()`: checks if the color exists in the RGB color space. Some colors in LAB for example doesn't exist in RGB.\n  * `complementary()`: returns the complementary color\n* `new jalette.Hsl(h, s, l)`: an HSL color\n  * `toString()`: converts to a string, e.g. `hsl(42, 42, 42)`. You can use it in CSS for instance.\n* `new jalette.Hsv(h, s, v)`: an HSV color\n  * `toHsl()`: converts the color to HSL\n  * `toRgb()`: converts the color to RGB\n* `new jalette.Xyz(x, y, z)`: an XYZ color\n  * `toRgb()`: converts the color to RGB\n* `new jalette.Lab(l, a, b)`: a LAB color\n  * `toRgb()`: converts the color to RGB\n\nStatic methods:\n* `jalette.generateColor(palette)`: generate a new color for the given palette.\n* `jalette.generate(n)`: generate a new palette conmtaining `n` colors.\n* `jalette.from(input)`: convert anything to a color. Anything can be `#ffffff`, `rgb(42, 42, 42)` and so on.\n* `jalette.to(colorName, input)`: convert anything to a specific color. Anything can be another color, strings described above and so on.\n* `jalette.Lab.CIE76(a, b)`: computes the distance (delta E) between two LAB colors, using the [CIE76 formula](http://en.wikipedia.org/wiki/Color_difference#CIE76).\n* `jalette.Lab.CIEDE2000(a, b)`: computes the distance (delta E) between two LAB colors, using the [CIEDE2000 formula](http://en.wikipedia.org/wiki/Color_difference#CIEDE2000).\n\nLicense\n=======\n\nJalette is an open-source software released under the MIT license.\n\nReferences\n==========\n\n* CIELAB on Wikipedia - https://en.wikipedia.org/wiki/CIELAB\n* I want hue - http://tools.medialab.sciences-po.fr/iwanthue/\n* HSL, HSB and HSV - http://codeitdown.com/hsl-hsb-hsv-color/\n* ColorMine - https://github.com/THEjoezack/ColorMine/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fjalette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femersion%2Fjalette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fjalette/lists"}