{"id":22432673,"url":"https://github.com/1999azzar/color-set","last_synced_at":"2025-03-27T07:42:45.464Z","repository":{"id":248132725,"uuid":"827852641","full_name":"1999AZZAR/color-set","owner":"1999AZZAR","description":"This project displays a collection of color sets, each containing ten colors. Users can browse through the color sets and copy a set's colors in a predefined CSS variable format by clicking on the set title.","archived":false,"fork":false,"pushed_at":"2024-07-25T14:58:42.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T12:45:47.870Z","etag":null,"topics":["color-picker","colorscheme","ui-design"],"latest_commit_sha":null,"homepage":"https://1999azzar.github.io/color-set/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1999AZZAR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-12T14:14:57.000Z","updated_at":"2024-07-25T14:58:46.000Z","dependencies_parsed_at":"2024-07-25T16:27:48.931Z","dependency_job_id":"6677f527-2fd1-4298-9e4a-d73ae28c2749","html_url":"https://github.com/1999AZZAR/color-set","commit_stats":null,"previous_names":["1999azzar/color-set"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fcolor-set","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fcolor-set/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fcolor-set/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fcolor-set/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1999AZZAR","download_url":"https://codeload.github.com/1999AZZAR/color-set/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806031,"owners_count":20675291,"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":["color-picker","colorscheme","ui-design"],"created_at":"2024-12-05T22:12:31.148Z","updated_at":"2025-03-27T07:42:45.444Z","avatar_url":"https://github.com/1999AZZAR.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Color Sets Project\n\n## Overview\n\nThis project displays a collection of color sets, each containing ten colors. Users can browse through the color sets and copy a set's colors in a predefined CSS variable format by clicking on the set title.\n\n## Features\n\n- **Responsive Design:** The interface is designed to be responsive and user-friendly.\n- **Pagination:** Color sets are displayed in pages with five sets per page.\n- **Copy to Clipboard:** Clicking on a set title copies the color set in a CSS variable format to the clipboard.\n\n## Installation\n\n1. **Clone the repository:**\n   ```sh\n   git clone https://github.com/1999AZZAR/color-set.git\n   ```\n2. **Navigate to the project directory:**\n   ```sh\n   cd color-set\n   ```\n\n## Usage\n\n1. Open the `index.html` file in a web browser.\n\n## File Structure\n\n- `index.html`: Main HTML file containing the structure and logic for displaying the color sets.\n- `README.md`: Detailed project description and usage instructions.\n\n## Detailed Description\n\n### HTML Structure\n\n- The `head` section includes the meta tags, title, and link to Google Fonts.\n- The `style` section defines the CSS for the project, ensuring a clean and modern look.\n- The `body` section contains:\n  - A main title (`h1`) for the page.\n  - A container (`div`) for displaying the color sets.\n  - A container (`div`) for pagination buttons.\n\n### JavaScript Logic\n\n1. **Data Structure:**\n   - An object named `colorSets` stores multiple color sets, each identified by a key like `set1`, `set2`, etc.\n\n2. **Pagination and Display:**\n   - The `displaySets` function handles the rendering of color sets based on the current page.\n   - The `displayPagination` function creates pagination buttons and updates the current page when a button is clicked.\n\n3. **Copy to Clipboard:**\n   - Clicking on a set title triggers the `copyToClipboard` function, which formats the color set into CSS variables and copies it to the clipboard.\n\n### CSS Styling\n\n- **Flexbox Layout:** Used for centering and aligning elements.\n- **Hover Effects:** Applied to color boxes and pagination buttons for interactivity.\n- **Responsive Design:** Ensures the page looks good on various screen sizes.\n\n## How It Works\n\n1. **Loading the Page:**\n   - The `displaySets` function is called to render the first set of color sets based on `currentPage`.\n\n2. **Navigating Pages:**\n   - Pagination buttons allow users to navigate between pages. The `currentPage` variable is updated, and `displaySets` is called again to refresh the display.\n\n3. **Copying Color Sets:**\n   - Clicking a set title formats the set's colors into CSS variables and copies it to the clipboard using the `copyToClipboard` function. An alert confirms the action.\n\n## Example\n\n### Displayed Color Set:\n\nWhen a user clicks on \"Set 1,\" the following text is copied to the clipboard:\n\n```css\n:root {\n    --primary-color: #5e4b56;\n    --secondary-color: #7e5878;\n    --tertiary-color: #9370db;\n    --quaternary-color: #9b8ca5;\n    --quinary-color: #c19ac4;\n    --senary-color: #cfa1e3;\n    --septenary-color: #d4a5d2;\n    --octonary-color: #bca5c8;\n    --nonary-color: #dccae3;\n    --denary-color: #f3e4f2;\n}\n```\n\n## Contributing\n\n1. **Fork the repository.**\n2. **Create a new branch:**\n   ```sh\n   git checkout -b feature/your-feature-name\n   ```\n3. **Commit your changes:**\n   ```sh\n   git commit -m 'Add some feature'\n   ```\n4. **Push to the branch:**\n   ```sh\n   git push origin feature/your-feature-name\n   ```\n5. **Open a pull request.**\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fcolor-set","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1999azzar%2Fcolor-set","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fcolor-set/lists"}