Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Radix Colors for Flutter

Radix Colors

A gorgeous, accessible color system An open-source color system for designing beautiful, accessible websites and apps. A dart library for Radix Colors

View the Flutter web demo

Installation

Add the Radix Colors package to pubspec.yaml

dependencies:
  radix_colors: ^1.0.3

Import the package in your dart file

import 'package:radix_colors/radix_colors.dart';

Usage

Radix Colors provides 15 color scales, designed for white foreground text at step 9.

Light color variant

RadixColors.amber;

Dark color variant

RadixColors.dark.amber;

Dynamic color for auto light/dark theme

RadixColorsDynamic(context).amber;

12 Colors steps/shades

RadixColors.amber.step1;
RadixColors.amber.step2;
RadixColors.amber.step3;
RadixColors.amber.step4;
RadixColors.amber.step5;
RadixColors.amber.step6;
RadixColors.amber.step7;
RadixColors.amber.step8;
RadixColors.amber.step9;
RadixColors.amber.step10;
RadixColors.amber.step11;
RadixColors.amber.step12;

There are 12 steps in each scale. Each step was designed for at least one specific use case.

StepUse case
1App background
2Subtle background
3UI element background
4Hovered UI element background
5Active Selected UI element background
6Subtle borders and separators
7UI element border and focus rings
8Hovered UI element border
9Solid backgrounds
10Hovered solid backgrounds
11Low-contrast text
12High-contrast text

Steps 1 and 2 are designed for app backgrounds and subtle component backgrounds. You can use them interchangeably, depending on the vibe you’re going for.

Appropriate applications include:

Steps 34, and 5 are designed for UI component backgrounds.

Even if your component has a transparent background in its default state, you should skip Step 3 and use Step 4 for its hover state.

For call-to-action components that you want to draw particular attention to, you can bump each color one step higher to steps 45, and 6.

For complex components where you need many subtle colors to communicate different meanings, you can get creative and do something like:

Steps 67, and 8 are designed for borders.

Steps 9 and 10 are designed for solid backgrounds.

Step 9 has the highest chroma of all steps in the scale. In other words, it’s the purest step, the step mixed with the least amount of white or black. Because 9 is the purest step, it has a wide range of applications:

Step 10 is designed for component hover states, where step 9 is the component’s normal state background.

Most step 9 colors are designed for white foreground text. RadixColors.skyRadixColors.mintRadixColors.limeRadixColors.yellow, and RadixColors.amber are designed for black foreground text and steps 9 and 10.

Steps 11 and 12 are designed for text.

A major part of this documentation was lifted from the Radix Colors website.

Download and/or contribute to Radix Colors package source code on GitHub

https://github.com/lesliearkorful/radix_colors
Exit mobile version
Skip to toolbar