candi_colors 0.0.32 copy "candi_colors: ^0.0.32" to clipboard
candi_colors: ^0.0.32 copied to clipboard

A Flutter color palette inspired by Scandinavian design principles. Hygge (warmth) and Lagom (balance).

Candi Colors for Flutter #

A Dart package providing Scandinavian design system colors for Flutter applications.

Features #

  • OKLCH-First: Colors defined using native OKLCH values for uniform design.
  • Dynamic Themes: Predefined light and dark mode palettes.
  • Zero Runtime Overhead: OKLCH to sRGB conversion occurs at build-time.
  • Compatibility: Supports all platforms (iOS, Android, Web, etc.).
  • 123 Colors: Including 60 primitive color tokens with variants.

Installation #

Add to pubspec.yaml:

dependencies:
  candi_colors:
    git:
      url: https://github.com/wtasg/candi.git
      path: flutter

Usage #

import 'package:candi_colors/candi.dart';

// Quick theming
MaterialApp(
  theme: CandiColors.light.toThemeData(),
  darkTheme: CandiColors.dark.toThemeData(),
);

// Direct color access
Container(color: CandiColors.light.surface);
Text('Hello', style: TextStyle(color: CandiColors.dark.text));

Primitive Colors #

10 color families with 6 variants each:

Family Base Subtle Soft Strong Outline On*
Red red redSubtle redSoft redStrong redOutline onRed
Blue blue blueSubtle blueSoft blueStrong blueOutline onBlue
Green green etc.
Yellow yellow
Magenta magenta
Cyan cyan
Teal teal
Pink pink
Gold gold
Silver silver
// Use primitives directly
Container(color: CandiColors.light.gold);
Container(color: CandiColors.dark.cyanSubtle);
Text('Alert', style: TextStyle(color: CandiColors.light.redStrong));

The CandiColor Class #

CandiColor extends Flutter's Color and includes OKLCH metadata.

final accent = CandiColors.light.accent;
print(accent.lightness); // 0.52
print(accent.chroma);    // 0.06
print(accent.hue);       // 230.0

Development #

  1. Update Changelog.md with changes
  2. Run flutter pub publish --dry-run to validate changes
  3. Run flutter pub publish to publish to pub.dev

License #

MIT License - See LICENSE for details.

0
likes
160
points
403
downloads

Publisher

verified publisheranubhavsaini.com

Weekly Downloads

A Flutter color palette inspired by Scandinavian design principles. Hygge (warmth) and Lagom (balance).

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on candi_colors