Improving the Bricks Builder Color Palette

In this post, we’ll explore how to improve the visibility of the Bricks Builder color palette using CSS.

Reading Time: 1 min.

The color palette is a fundamental tool in web design; however, the native palette in Bricks Builder presents some challenges when working with dark or transparent tones. White transparencies, for example, often appear gray, while darker colors can nearly disappear, making them hard to identify.

While this solution may not be ideal for everyone, it has solved several visibility issues for me, making it much easier and more accurate to work with colors.

Activating the editor’s custom mode

Before getting started, go to Bricks settings and enable “Custom” mode. After selecting it, save and reload the page to make the code box appear.

Activating the editor's custom mode
Activating the editor’s custom mode

Adding CSS

With CSS, we’ll tackle the three main issues I’ve identified in Bricks Builder’s color palette, addressing each one separately. This way, you can choose which changes to implement based on your needs.

Improving the Display of Transparencies and Dark Colors

before after color palette

With this code, we add a subtle chessboard pattern and a border to make it easier to identify dark colors and transparencies. I’ve adjusted the contrast of the chessboard so it doesn’t interfere too much with the appearance of transparent colors.

[data-control=color] .bricks-control-popup .color-palette li.color{
    --dot-color: rgba(255,255,255,0.1);
    --border-color: #4c5d6e;
    background-color: transparent;
    background-image: linear-gradient(45deg, var(--dot-color) 25%, transparent 25%),
    linear-gradient(-45deg, var(--dot-color) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--dot-color) 75%),
    linear-gradient(-45deg, transparent 75%, var(--dot-color) 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
    border-radius: 100vw;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

[data-control=color] .bricks-control-popup .color-palette li.color div.color-button{
    border-radius: 5px;
}

Columns and max-width

color palette columns

With the following CSS lines, we can set the number of columns and define a max-width, preventing the palette from becoming oversized when resizing the sidebar. For my color palette, 7 columns work well, as they organize the shades into two neat rows.

[data-control=color] .bricks-control-popup.bottom{
    left: auto;
    right: 0;
    width: 100%;
    max-width: 300px;
}

[data-control=color] .bricks-control-popup .color-palette {
    grid-template-columns: repeat(7, 1fr);
}

Related posts

Adding product images to Woocommerce checkout

Adding product images to Woocommerce checkout

Reading Time: 0 min.

To add images to Woocommerce checkout just add the following code to your functions.php file:

Leer artículo
Sticky sidebar | Floating column - Bricks Builder

Sticky sidebar | Floating column – Bricks Builder

Reading Time: 2 min.

In this post I will show you how to create a sticky sidebar in the right way, no more hiding…

Leer artículo
Automatic FAQ Schema for Bricks Builder

Create an automatic FAQ Schema for an Nestable Accordion

Reading Time: 1 min.

I was looking for how to create a Squema type FAQ in Bricks with a nestable accordion but I didn’t…

Leer artículo