BlazorColorPicker 4.0.0
See the version list below for details.
dotnet add package BlazorColorPicker --version 4.0.0
NuGet\Install-Package BlazorColorPicker -Version 4.0.0
<PackageReference Include="BlazorColorPicker" Version="4.0.0" />
<PackageVersion Include="BlazorColorPicker" Version="4.0.0" />
<PackageReference Include="BlazorColorPicker" />
paket add BlazorColorPicker --version 4.0.0
#r "nuget: BlazorColorPicker, 4.0.0"
#addin nuget:?package=BlazorColorPicker&version=4.0.0
#tool nuget:?package=BlazorColorPicker&version=4.0.0
Blazor-Color-Picker
Sometimes HTML5 colorpicker doesn't suit me for an application. I prefer to offer the user a predefined color palette
DEMO : https://tossnet.github.io/Blazor-Color-Picker/
Opens a palette with the Material colors
Installation
The implementation has been improved: version 4.0 uses a service declared via dependency injection
To Install
Install-Package BlazorColorPicker
or
dotnet add package BlazorColorPicker
For client-side and server-side Blazor - add script section to index.html or _Host.cshtml (head section)
<link href="_content/BlazorColorPicker/colorpicker.css" rel="stylesheet" />
In program.cs, declare
builder.Services.AddScoped<IColorPickerService, ColorPickerService>();
ColorPicker are rendered by the <BlazorColorPicker.ColorPicker />
. 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 <main> section.
Usage
@page "/"
@using BlazorColorPicker
@inject IColorPickerService ColorPickerService
<h1>Hello, world!</h1>
<button class="btn btn-primary" @onclick="OpenModal">
<div style="background-color:@color" class="buttonColor"></div> Select a Color
</button>
@code {
private string color = "#F1F7E9";
private async Task OpenModal()
{
var parameters = new ColorPickerParameters
{
ColorSelected = color,
};
color = await ColorPickerService.ShowColorPicker(parameters);
}
}
<a name="ReleaseNotes"></a>Release Notes
<details open="open"><summary>Version 4.0.0</summary>
- the implementation has been improved: version 4.0 uses a service declared via dependency injection </details>
⚠️ Breaking changes ⚠️
<details><summary>Version 3.1.0</summary>
- you can customise the size of the palette using your CSS styles
- A red colour of the first column was not correct
- Re-addition of .NET7 compatibility </details>
<details><summary>Version 2.2.0</summary>
- Remove the internal use of IJSRuntime </details>
<details><summary>Version 2.1.0</summary>
- no need to declare the _content/BlazorColorPicker/colorpicker.js file </details>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net7.0
- Microsoft.AspNetCore.Components.Web (>= 7.0.17)
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.11)
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.3)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on BlazorColorPicker:
Package | Downloads |
---|---|
PrototyperThemeRCL
Do not use yet. A Razor Class Library that provides user built themes to attach to pages and components. Themes are divided into 'Sets' and a set is applied to a page or component. No knowledge of CSS is required to set up a Theme. |
|
PrototyperMenuRCL
Do not try to use this yet. A Razor Class Library that provides data driven menus. The current version only allows very graphical menu buttons. Menu 'Sets' contain menu 'Rows' which in turn contain 'buttons'. Clicking on a button can (1) go to another menu set (2) go to a page in the host app (3) load a component from the host or the RCL. Provides easy maintence of the data and easy to implement. |
|
KristofferStrube.Blazor.SVGEditor
A SVG Editor that is implemented in and for Blazor. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on BlazorColorPicker:
Repository | Stars |
---|---|
KristofferStrube/Blazor.SVGEditor
A basic SVG editor written in Blazor.
|
Version | Downloads | Last Updated |
---|---|---|
4.0.2 | 1,151 | 3/16/2025 |
4.0.1 | 140 | 3/15/2025 |
4.0.0 | 114 | 3/15/2025 |
3.1.2 | 3,712 | 11/15/2024 |
3.1.1 | 11,059 | 3/31/2024 |
3.1.0 | 394 | 3/30/2024 |
3.0.0 | 1,748 | 1/26/2024 |
2.3.1 | 4,406 | 11/15/2023 |
2.3.0 | 14,530 | 12/2/2022 |
2.2.0 | 4,925 | 10/22/2022 |
2.1.0 | 30,388 | 4/4/2022 |
2.0.1 | 1,534 | 2/16/2022 |
2.0.0 | 4,345 | 12/16/2021 |
1.2.1 | 16,533 | 6/15/2021 |
1.2.0 | 710 | 5/17/2021 |
1.1.2 | 9,186 | 1/16/2021 |
1.1.1 | 7,521 | 11/1/2020 |
1.1.0 | 1,755 | 10/14/2020 |
1.0.9 | 1,791 | 5/27/2020 |
1.0.8 | 573 | 5/26/2020 |
1.0.7 | 829 | 5/25/2020 |
1.0.6 | 574 | 5/25/2020 |
1.0.5 | 561 | 5/25/2020 |
1.0.2 | 533 | 5/25/2020 |
1.0.1 | 528 | 5/25/2020 |
Update nuget package