{"id":13544368,"url":"https://github.com/holmansv/react-native-color-palette","last_synced_at":"2025-04-10T13:54:43.546Z","repository":{"id":32867239,"uuid":"144722392","full_name":"holmansv/react-native-color-palette","owner":"holmansv","description":"A react native module for simple hex color selection","archived":false,"fork":false,"pushed_at":"2023-03-03T10:11:40.000Z","size":1446,"stargazers_count":53,"open_issues_count":12,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T02:05:19.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/holmansv.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}},"created_at":"2018-08-14T13:15:11.000Z","updated_at":"2024-06-10T20:01:19.000Z","dependencies_parsed_at":"2024-01-16T15:50:21.523Z","dependency_job_id":"3547ce88-13e0-4560-b368-7334bb0cad59","html_url":"https://github.com/holmansv/react-native-color-palette","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmansv%2Freact-native-color-palette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmansv%2Freact-native-color-palette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmansv%2Freact-native-color-palette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmansv%2Freact-native-color-palette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holmansv","download_url":"https://codeload.github.com/holmansv/react-native-color-palette/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247721895,"owners_count":20985084,"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-08-01T11:00:47.120Z","updated_at":"2025-04-10T13:54:43.522Z","avatar_url":"https://github.com/holmansv.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# React Native Color Palette.\n\nA react native module for simple hex color selection\n\n![alt text](./images/color-picker.png \"Logo Title Text 1\")\n\n* [x] Controlled and Uncontrolled implementations\n* [x] Simple to use\n\n\n## Getting started\nInstall the color picker\n```\nnpm install react-native-color-palette --save\n```\n\n```javascript\nimport ColorPalette from 'react-native-color-palette'\n\nconst UncontrolledColorPicker = () =\u003e (\n  \u003cColorPalette\n    onChange={color =\u003e alert(`Color selected: ${color}`)}\n    defaultColor={'#C0392B'}\n    colors={['#C0392B', '#E74C3C', '#9B59B6', '#8E44AD', '#2980B9']}\n    title={\"Uncontrolled Color Palette:\"}\n    icon={\n      \u003cText\u003e✔\u003c/Text\u003e︎\n      // Icon can just be text or ASCII\n    }\n  /\u003e\n)\n\nconst ControlledColorPicker = () =\u003e {\n  let selectedColor = '#C0392B';\n  return (\n    \u003cColorPalette\n      onChange={color =\u003e selectedColor = color}\n      value={selectedColor}\n      colors={['#C0392B', '#E74C3C', '#9B59B6', '#8E44AD', '#2980B9']}\n      title={\"Controlled Color Palette:\"}\n      icon={\n        \u003cIcon name={'check-circle-o'} size={25} color={'black'} /\u003e\n      // React-Native-Vector-Icons Example\n    }\n  /\u003e)\n}\n```\nDue to its Flexbox design, Color Palette will use the space you provide!\n\n## API\n### Props\n\nColor Palette accepts properties below.\n\n| Property        | Type             | Note                                                                                                                           |\n| --------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| `colors`        | `Array`          | Array of hex color strings for rendering. ex) ['#C0392B', '#E74C3C', '#9B59B6', '#8E44AD', '#2980B9']                          |\n| `defaultColor`  | `String`         | Defines initial selected color in uncontrolled component.                                                                      |\n| `value`         | `String`         | Defines selected color in controlled component.                                                                                |\n| `paletteStyles` | `ViewStyle`      | Styles passed to color palette container                                                                                       |\n| `onChange`      | `Function`       | Callback with color (HEX string) as argument called when user confirms color selection.                                        |\n| `title`         | `String`         | Text to display at the top of the palette.                                                                                     |\n| `titleStyles`   | `TextStyle`      | Inherits the default react-native Text Styles                                                                                  |\n| `icon`          | `Text` or `Icon` | Selector Text or Icon to be displayed in place of checkmark.                                                                   |\n| `scaleToWindow` | `Bool`           | This will automatically scale the palette to fit 6 per line and will scale up/down for iPads/ iPhones depending on window size |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholmansv%2Freact-native-color-palette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholmansv%2Freact-native-color-palette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholmansv%2Freact-native-color-palette/lists"}