Color Area
A color area lets users tweak two channels of an RGB, HSL, or HSB color against a 2D gradient backdrop.
Basic
A color area allows users to select a color interactively.
Preview
Code
Installation
CLI
Manual
npx hq-kit add color-area
Channel
Specify the color channels for the horizontal and vertical axes using the xChannel
and yChannel
properties.
Preview
Code
Space
Define the color space for operation, which must align with the xChannel and yChannel. The default is set based on the color
or defaultColor
value. Valid types include rgb
, hsl
, and hsb
.
Preview
Code
Controlled
Control the color area by specifying channels for the horizontal (xChannel
) and vertical (yChannel
) axes.
Preview
Code
hsla(0, 100%, 50%, 1)
Disabled
Disable the color area component. While it's possible to disable the thumb component, it's generally not advisable.
Preview
Code
Color Area with Slider
You can use the color area with the slider to control the color.
Preview
Code