Learn how to choose colors using the color picker.
Choosing a color for fonts, backgrounds, borders, or whatever is one of the most common operations when designing a website. You can use the color picker to choose a color and set its opacity. Additionally, you can set color variables on your site and select those when using the color picker.
Pick a color and set its opacity
You can pick a color in one of the following ways:
- Using the eyedropper tool
- Using the color plane and sliders
- Typing in values in the appropriate input fields
You can check the contrast ratio of text on your site directly from the color picker, which displays not only the contrast ratio of text but also the WCAG level rating that corresponds to that contrast ratio.
Contrast ratio impacts your site’s accessibility. Sufficient contrast ratio depends on the foreground (your text) and background colors (the background over which the text appears), font size, and font weight.
You can also toggle the "eye" icon in the contrast ratio area of the color picker to see the curves between AA, AAA, and a Fail rating on WCAG.
To pick a color from any element on the canvas or outside your current browser window, use the eyedropper tool. You can press the spacebar key to show or hide RGB numbers for the target color.
Using the color plane and sliders
To pick a color from the spectrum, use the hue slider to choose a hue, then use the color plane to pick the right shade. If you want to make the color less opaque, use the opacity slider.
Color plane
The color plane allows you to pick the shade of the color you want to use. You can move the picker along the x-axis to adjust the saturation of the color, and along the y-axis to adjust the brightness. To change the color, use the hue slider below.
Hue slider
The hue slider allows you to pick the hue of the color you want to use from the color spectrum. Then you can pick the right shade using the color plane above.
Opacity slider
The opacity slider allows you to specify the transparency level of your color. 100% will make the color fully opaque, any value below that will make the color see-through. This is useful when adding color overlays on images or creating see-through backgrounds.
If you want to get more precise when choosing a color, you can use web color names, Hex codes, HSB/HSBA values, or RGB/RGBA values. You can paste these values in any color field in the Style panel or in the HEX input field in the color picker. Alternatively, you can breakdown the code and input each value in its own field:
- Hex values in the HEX field
- HSBA values, broken down, in the H S B and A fields
- RGBA values, broken down, in the R G B and A fields
You can toggle between HSB and RGB by clicking the labels.
This input field supports all web color formats, so you can input any HTML color value. All values will be converted to HEX. Learn more about HEX codes and web color formats.
Next to the HEX input field, you’ll notice 3 input fields labeled “H S B”. If you click the label, it will switch to “R G B”. To switch back, click the label again.
“H” stands for hue. As you change the color using the hue slider, the value in the field labeled “H” will change. “S” stands for saturation and “B” stands for brightness. These values will be updated as you move the picker in the color plane. If you know the HSB values of the color you want to use, you can input the values in the appropriate fields.
If you know the RGB values of your color, click the HSB label and input the value for Red “R”, Green “G”, and Blue “B”. These fields will also automatically show the correct values regardless of the tool you’ve used to pick your color.
“A” stands for alpha channel. The alpha channel determines the transparency of the color. This value is impacted by the opacity slider. The Alpha value can be anything between 0 and 100%. If you know the alpha value of your color, multiply it by 100 and type it in this input field.
Learn more