{"id":20531901,"url":"https://github.com/tossnet/blazor-color-picker","last_synced_at":"2025-04-05T11:07:02.118Z","repository":{"id":37496163,"uuid":"266345489","full_name":"tossnet/Blazor-Color-Picker","owner":"tossnet","description":"Opens a palette with the Material colors for Blazor application","archived":false,"fork":false,"pushed_at":"2025-03-16T15:59:20.000Z","size":11283,"stargazers_count":35,"open_issues_count":1,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T10:05:54.112Z","etag":null,"topics":["blazor","blazor-application","blazor-client","blazor-color-picker","blazor-component","blazor-server","blazor-webassembly","color-picker","material-colors","nuget","palette"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tossnet.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":"2020-05-23T13:47:06.000Z","updated_at":"2025-03-17T13:07:07.000Z","dependencies_parsed_at":"2024-04-10T05:38:44.270Z","dependency_job_id":"743ada01-12de-4181-bad0-a4388887eccb","html_url":"https://github.com/tossnet/Blazor-Color-Picker","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/tossnet%2FBlazor-Color-Picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tossnet%2FBlazor-Color-Picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tossnet%2FBlazor-Color-Picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tossnet%2FBlazor-Color-Picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tossnet","download_url":"https://codeload.github.com/tossnet/Blazor-Color-Picker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246168102,"owners_count":20734390,"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":["blazor","blazor-application","blazor-client","blazor-color-picker","blazor-component","blazor-server","blazor-webassembly","color-picker","material-colors","nuget","palette"],"created_at":"2024-11-16T00:10:45.276Z","updated_at":"2025-03-29T10:05:59.797Z","avatar_url":"https://github.com/tossnet.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Blazor-Color-Picker\n[![NuGet](https://img.shields.io/nuget/v/BlazorColorPicker.svg)](https://www.nuget.org/packages/BlazorColorPicker/) ![BlazorColorPicker Nuget Package](https://img.shields.io/nuget/dt/BlazorColorPicker)\n\nSometimes HTML5 colorpicker doesn't suit me for an application. I prefer to offer the user a predefined color palette\n\nDEMO : https://tossnet.github.io/Blazor-Color-Picker/\n\nOpens a palette with the Material colors\n\n![Blazor Color Picker](https://github.com/tossnet/Blazor-Color-Picker/blob/master/BlazorColorPicker.gif)\n\n\n# Installation\n\n\u003e [!WARNING]\n\u003e The implementation has been improved: version 4.0 uses a service declared via dependency injection\n\nLatest version in here: [![NuGet](https://img.shields.io/nuget/v/BlazorColorPicker.svg)](https://www.nuget.org/packages/BlazorColorPicker/)\n\nTo Install\n\n```\nInstall-Package BlazorColorPicker\n```\nor\n```\ndotnet add package BlazorColorPicker\n```\nFor client-side and server-side Blazor - add script section to index.html or _Host.cshtml (head section)\n\n```html\n\u003clink href=\"_content/BlazorColorPicker/colorpicker.css\" rel=\"stylesheet\" /\u003e\n```\n\nIn program.cs, declare \n\n```csharp\nbuilder.Services.AddColorPicker();\n```\n\n**ColorPicker** are rendered by the `\u003cBlazorColorPicker.ColorPicker /\u003e`. This component needs to be added to the main layout of your application/site. You typically do this in the `MainLayout.razor` file at the end of the \u003cmain\u003e section.\n\n## Usage\n\n```html\n@page \"/\"\n@using BlazorColorPicker\n\n@inject IColorPickerService ColorPickerService\n\n\u003cbutton class=\"btn btn-primary\" @onclick=\"OpenModal\"\u003e\n    \u003cdiv style=\"background-color:@color\" class=\"buttonColor\"\u003e\u003c/div\u003e Select a Color\n\u003c/button\u003e\n\n@code {\n    private string color = \"#F1F7E9\";\n\n    private async Task OpenModal()\n    {\n        var parameters = new ColorPickerParameters\n        {\n        \tColorSelected = color,\n        };\n        color = await ColorPickerService.ShowColorPicker(parameters);\n    }\n}\n```\n\n## \u003ca name=\"ReleaseNotes\"\u003e\u003c/a\u003eRelease Notes\n\n\u003cdetails open=\"open\"\u003e\u003csummary\u003eVersion 4.0.2\u003c/summary\u003e\n\u003e- Added AddColorPicker() to simplify declaration\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eVersion 4.0.1\u003c/summary\u003e\n\u003e- increase the z-index to 9999\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eVersion 4.0.0\u003c/summary\u003e\n\u003e- the implementation has been improved: version 4.0 uses a service declared via dependency injection\n\u003c/details\u003e\n\n## ⚠️ Breaking changes ⚠️\n\n\u003cdetails\u003e\u003csummary\u003eVersion 3.1.0\u003c/summary\u003e\n\u003e- you can customise the size of the palette using your CSS styles\n\u003e- A red colour of the first column was not correct\n\u003e- Re-addition of .NET7 compatibility\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eVersion 2.2.0\u003c/summary\u003e\n    \n\u003e- Remove the internal use of IJSRuntime\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eVersion 2.1.0\u003c/summary\u003e\n    \n\u003e- no need to declare the _content/BlazorColorPicker/colorpicker.js file\n\u003c/details\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftossnet%2Fblazor-color-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftossnet%2Fblazor-color-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftossnet%2Fblazor-color-picker/lists"}