Color System

First Published On:
April 23, 2024
Last Updated:
May 2, 2024

Summary

Figure 1. Animation demonstrating state layer implementation.

No items found.

The LiftKit color system is almost exactly the same as Material 3’s color system. You can read their documentation instead of this one, and you’ll mostly be fine. The difference isn’t in how the system works in theory. But rather, it’s a difference of implementation.

Material is geared primarily for app developers working with Android and Flutter, and it has limited official support for web. LiftKit packages the system specifically for web to make it a little easier for everyone to use.

It Starts with a Palette

Before you start building, you need a color palette. A color palette tells you what colors you’re allowed to use. Instead of designing one from scratch, LiftKit generates one for you.

Palettes have numerous benefits:

  • It ensures your colors stay consistent as your app grows
  • If you have multiple designers, it ensures they all use the same colors
  • It makes your code easier to organize
  • If you update a swatch from the palette, it’ll update everywhere that uses it.

A palette consists of swatches. Swatches are variables that can hold colors. When we’re building, we assign swatches, not raw colors.

Look at the example below.

I have three swatches: “Primary,” “Accent,” and “Surface.” You can see where these swatches are applied. If we’re talking about the background color on the “New” label, we’d say it has a background color of “Primary.” We would not say it has a background color of “blue.” It’s very important to get in the habit of talking about colors this way, for reasons that will become self-evident as we continue.

How the System Works

Figure 2 below demonstrates how the system generates a palette.

Recommended Usage

Customization

Resources that mention this topic

No items found.