{"id":17910774,"url":"https://github.com/thebuilder/datocms-plugin-theme-selector","last_synced_at":"2025-03-23T22:33:07.202Z","repository":{"id":42038495,"uuid":"370327668","full_name":"thebuilder/datocms-plugin-theme-selector","owner":"thebuilder","description":"A plugin for DatoCMS that allows you select a color from a predefined list","archived":false,"fork":false,"pushed_at":"2022-04-16T15:48:27.000Z","size":443,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-07T04:43:35.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/thebuilder.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":"2021-05-24T11:25:15.000Z","updated_at":"2023-01-26T09:00:32.000Z","dependencies_parsed_at":"2022-08-12T03:01:14.700Z","dependency_job_id":null,"html_url":"https://github.com/thebuilder/datocms-plugin-theme-selector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebuilder%2Fdatocms-plugin-theme-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebuilder%2Fdatocms-plugin-theme-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebuilder%2Fdatocms-plugin-theme-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebuilder%2Fdatocms-plugin-theme-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thebuilder","download_url":"https://codeload.github.com/thebuilder/datocms-plugin-theme-selector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221919494,"owners_count":16901805,"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-28T19:34:30.126Z","updated_at":"2024-10-28T19:34:30.981Z","avatar_url":"https://github.com/thebuilder.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DatoCMS Theme Selector\n\nA plugin for DatoCMS that allows you select a color from a predefined list. The\nnormal `color` field opens a color picker, but doesn't enforce a fixed set of\ncolors.\n\n![Example](docs/example.png)\n\n## Configuration\n\nMake sure you apply the plugin on a color field, and fill out the preset color\nlist. You can define a default set of colors globally, and override them on an\ninstance. Use the global option if you have default set of values you should be\nable to select from.\n\nA valid list of colors could look like this:\n\n```\n#feb2b2, #fc8181, #f56565, #e53e3e, #c53030\n```\n\n## Querying\n\nThe plugin is using the `color` field, which means you have access to a color object. \n\n```graphql\nquery ArticleQuery {\n  allArticles {\n    theme {\n      hex\n      red\n      green\n      blue\n      alpha\n    }\n  }\n}\n```\n\nIf you just need the `hex` value, like you added in the settings, you can limit your query lookup for that value.\n\n\n```graphql\nquery ArticleQuery {\n  allArticles {\n    theme {\n      hex\n    }\n  }\n}\n```\n\n## Development\n\nThe plugin is built using [Vite.js](https://vitejs.dev/). This enables a fast development workflow, where\nyou see the changes as soon as you save a file. For it to work, it needs to\nbe rendered inside the DatoCMS interface.\n\nSo when testing the plugin locally, you should [create a new plugin](https://www.datocms.com/docs/building-plugins/creating-a-new-plugin) in a DatoCMS\nproject, and point it to `http://localhost:3000`.\n\n![Example](docs/development.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebuilder%2Fdatocms-plugin-theme-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthebuilder%2Fdatocms-plugin-theme-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebuilder%2Fdatocms-plugin-theme-selector/lists"}