Blazor ColorGradient - Overview

  • Overview.razor
Loading the demo source code...please wait.
blazor ui ninja image

The ColorGradient component is part of Telerik UI for Blazor, a professional grade UI library with 100 native components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Description

The Telerik UI for Blazor ColorGradient renders an HSV canvas editor for customizing the color and its opacity and value fields for viewing and editing color values in HEX or RGB formats. This is a very easy way to implement a fully functional and precise color picker for your Blazor applications.

The ColorGradient supports the following features:

  • Value: Set the exact color. You can manually set the default value or set it programmatically via two-way binding.
  • Formats: Choose to allow your users to see and edit colors in HEX, RGB or both formats (both are enabled by default).
  • Format: Set the color format that the user sees by default (RGB is default).
  • ValueFormat: Set the color format the applications return in code (RGB is default).
  • Show opacity editor: By default, an opacity will appear. You can decide to disable it.

The demo above is a fully functional Blazor ColorGradient example. Use the vertical sliders on the right side to choose the base color and opacity. Click and drag on the gradient canvas to fine-tune your selection. At the bottom, you can decide to show the color values in HEX or RGBA. The value changes as you manipulate the sliders and color selector. You can also enter the numeric values manually.

Take a look at the “View Source” tab and you can see that it only takes a line of code to instantiate the Blazor ColorGradient component and another to set the default color.

This Blazor ColorGradient - Overview demo is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik Blazor components and their features in action. View the source code of each of the demos or directly adapt and edit them, including their theme appearance, in some of our dedicated playgrounds for Blazor projects - Telerik REPL for Blazor.

Support & Learning Resources

Additional Resources

An error has occurred. This application may no longer respond until reloaded.
Reload