{"id":20779229,"url":"https://github.com/bolt/color","last_synced_at":"2025-07-24T22:35:45.032Z","repository":{"id":56638843,"uuid":"285533476","full_name":"bolt/color","owner":"bolt","description":"Color field extension","archived":false,"fork":false,"pushed_at":"2021-03-25T12:33:25.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-01T02:05:53.072Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/bolt.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":"2020-08-06T09:47:50.000Z","updated_at":"2025-06-11T04:39:17.000Z","dependencies_parsed_at":"2022-08-15T22:20:50.889Z","dependency_job_id":null,"html_url":"https://github.com/bolt/color","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bolt/color","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Fcolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Fcolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Fcolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Fcolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bolt","download_url":"https://codeload.github.com/bolt/color/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolt%2Fcolor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266913753,"owners_count":24005584,"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-24T02:00:09.469Z","response_time":99,"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-11-17T13:26:42.202Z","updated_at":"2025-07-24T22:35:44.956Z","avatar_url":"https://github.com/bolt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎨 Bolt Color Field Extension\n\nThis extension allows you to use fields of `type: color` in your \nContentTypes, as defined in `contenttypes.yaml`.\n\nYou can also manipulate colors in Twig, with all the might\nof the [Iris PHP Color library](https://github.com/ozdemirburak/iris).\n\n## Installation\n```bash\ncomposer require bolt/color\n```\n\n-------\n\n## Usage\n\n### Definition\n\nIn your `contenttypes.yaml`, you can define the following field:\n\n```yaml\n      background:\n          type: color\n          label: Background color\n```\n\nWhich will show up as a colorpicker field like this (without red highlight):\n\n![Color field](./screenshots/color-field.png)\n\n### In twig\n\nTo get the hex value (`#ff0000`), simply use:\n\n```twig\n{{ record.background }} \n```\n\nThe [Iris library](https://github.com/ozdemirburak/iris) allows many ways\nin which you can manipulate the value of the field, for example:\n\n```twig\n{{ record.background.red }} {# get the amount of red #}\n{{ record.background.values }} {# array with ['ff', '00', 'ff'] rgb values #}\n{{ record.background.lighten(20) }} \n{{ record.background.darken(10) }} \n{{ record.background.dark }} {# true if color is dark #}\n{{ record.background.hsl }} {# converts to HSL #}\n{{ record.background.rgba }} {# converts to RGBA #}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolt%2Fcolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolt%2Fcolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolt%2Fcolor/lists"}