{"id":28455409,"url":"https://github.com/rafalgolarz/claritas","last_synced_at":"2025-10-19T13:16:02.193Z","repository":{"id":57483139,"uuid":"236935444","full_name":"rafalgolarz/claritas","owner":"rafalgolarz","description":"Generate different variations of brightness for the given color.","archived":false,"fork":false,"pushed_at":"2020-02-12T12:31:27.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-28T22:37:14.555Z","etag":null,"topics":["colors","elixir","elixir-lang","hex","package"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/claritas","language":"Elixir","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/rafalgolarz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-29T08:26:46.000Z","updated_at":"2020-05-01T11:34:38.000Z","dependencies_parsed_at":"2022-08-27T21:02:28.032Z","dependency_job_id":null,"html_url":"https://github.com/rafalgolarz/claritas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rafalgolarz/claritas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafalgolarz%2Fclaritas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafalgolarz%2Fclaritas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafalgolarz%2Fclaritas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafalgolarz%2Fclaritas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafalgolarz","download_url":"https://codeload.github.com/rafalgolarz/claritas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafalgolarz%2Fclaritas/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266753795,"owners_count":23979140,"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-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["colors","elixir","elixir-lang","hex","package"],"created_at":"2025-06-06T22:00:47.075Z","updated_at":"2025-10-19T13:15:57.140Z","avatar_url":"https://github.com/rafalgolarz.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claritas\n\n [![Hex.pm](https://img.shields.io/hexpm/v/claritas.svg?maxAge=2592000)](https://hex.pm/packages/claritas)\n[![Downloads](https://img.shields.io/hexpm/dt/claritas.svg?maxAge=3600)](https://hex.pm/packages/claritas)\n [![Build Status](https://travis-ci.org/rafalgolarz/claritas.svg?branch=master)](https://travis-ci.org/rafalgolarz/claritas)\n\nLibrary for generating different variations of brightness for given color.\n\n## Installation\n\nThe package can be installed by adding `claritas` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:claritas, \"~\u003e 0.1.1\"}\n  ]\nend\n```\n\nand running `mix deps.get` in your console to fetch from Hex.\n\n## Basic Usage\n\n### positive values are lightening the color\n\n```\niex\u003e Claritas.shift(\"#f06d06\", 30)\n{:ok, \"#FF8B24\"}\n```\n\n### negative values are darkening the color\n\n```\niex\u003e Claritas.shift(\"#f06d06\", -30)\n{:ok, \"#D24F00\"}\n```\n\n### Dynamically increase/decrease brightness of your colors.\n\nController:\n\n```\ndef index(conn, _params) do\n  shades =\n    for i \u003c- 1..20, into: [] do\n      Claritas.shift(\"#141C5B\", 10 * i)\n    end\n\n  render(conn, \"index.html\", shades: shades)\nend\n```\n\nTemplate:\n\n```\n\u003cul\u003e\n  \u003c%= for {_, shade} \u003c- @shades do %\u003e\n    \u003cli\u003e\u003cspan style='background-color: \u003c%= shade %\u003e'\u003e\u003c%= shade %\u003e\u003c/span\u003e\u003c/li\u003e\n  \u003c% end %\u003e\n\u003c/ul\u003e\n```\n\nOutput:\n\n\u003cimg src=\"assets/claritas_demo.png\" /\u003e\n\n## Author\nRafał Golarz\n\nClaritas is released under the [MIT License](https://github.com/rafalgolarz/claritas/blob/master/LICENSE.txt).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafalgolarz%2Fclaritas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafalgolarz%2Fclaritas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafalgolarz%2Fclaritas/lists"}