{"id":16710637,"url":"https://github.com/mdgriffith/elm-color","last_synced_at":"2025-10-04T22:09:21.938Z","repository":{"id":77476222,"uuid":"120789877","full_name":"mdgriffith/elm-color","owner":"mdgriffith","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-28T14:09:53.000Z","size":6,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T19:55:37.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdgriffith.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-08T16:53:35.000Z","updated_at":"2023-07-25T14:14:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"82f07cb3-8ab1-4f6a-a6c0-15390cfce651","html_url":"https://github.com/mdgriffith/elm-color","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdgriffith/elm-color","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdgriffith","download_url":"https://codeload.github.com/mdgriffith/elm-color/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-color/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278380983,"owners_count":25977319,"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-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2024-10-12T20:09:10.198Z","updated_at":"2025-10-04T22:09:21.894Z","avatar_url":"https://github.com/mdgriffith.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Common Color\n\nThe `Color` type is moving out of core (which makes a lot of sense) in `0.19`, so I wanted to discuss what that means for libraries that use it.\n\nThe main benefit of `Color` being in the core library was having a single type that color libraries could use to work with each other.  So, let's just standardize over one color type! \n\nHere's what I think it should be:\n\n```elm\ntype alias Color =\n    { red : Float\n    , green : Float\n    , blue : Float\n    , alpha : Float\n    }\n```\n\nEach channel is normalized between 0 and 1.\n\n\nThis package is meant to be a series of convenience functions around this new color type.\n\nThe cool part being you can be compatible with this library without having to depend on it.\n\nIt uses that type as it's `Color` and includes functions for:\n\n- converting hsl to standard color (i.e. rgb)\n- calculating contrast of colors\n- simulating vision characteristics (color blindness, etc.)\n- mixing two colors using the linearRgb colorspace.\n- formatting to css values\n- parsing hex values\n\n\nBoth `elm-style-animation` and `style-elements` need to use a `Color` type, but before making that change I wanted to post this here :)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Felm-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdgriffith%2Felm-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Felm-color/lists"}