FLUTTER ECOSYSTEM

mattrltrent/colorify

🎨 Ein einfaches Flutter-Paket zum Generieren deterministischer Zufallsfarben aus einem gegebenen dynamischen Seed.

Projektcover von colorify
Stars
1
Forks
0
Letzter Push (UTC)
14.01.2025
Projektstatus
Aktiv
Matthew Trent GitHub avatar
GITHUB User

Matthew Trent ↗

SWE @ Sorce (YC F25) | MS CS @ Columbia | Prev. @ Probe, Magi, Confesi (Founder) | Honors BS CS w/ Distinction

Sorce (YC F25)San Francisco, CA
SprachenC++CMakeDartSwiftCHTMLKotlinObjective-C

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 4 Einträge
  • flutter{"sdk":"flutter"}
  • crypto^3.0.6
  • flutter_testEntwicklung{"sdk":"flutter"}
  • flutter_lintsEntwicklung^4.0.0

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

Projekt-README ein-/ausklappen

Colorify

An extremely simple Flutter package that deterministically converts arbitrary dynamic input into a Color. Published mainly for personal use to avoid reinventing the wheel in my projects.

Usage

https://raw.githubusercontent.com/mattrltrent/random_assets/refs/heads/main/colorify_ex.gif
Basic Example
import 'package:colorify/colorify.dart' as c;
import 'package:flutter/material.dart';

void main() {
  final input = 'example-seed';
  final color = c.colorify(input);
  print(color); // Outputs a Color object deterministically derived from 'example-seed'.
}
Customizing Color Type

You can specify the type of colors generated by using the ColorType enum:

  • ColorType.all: Generates colors from the full spectrum.
  • ColorType.brights: Generates bright and vibrant colors.

Example:

import 'package:colorify/colorify.dart' as c;
import 'package:flutter/material.dart';

void main() {
  final input = 'example-seed';

  // Generate a color from the full spectrum
  final allColors = c.colorify(input, colorType: c.ColorType.all);

  // Generate a bright color
  final brightColor = c.colorify(input, colorType: c.ColorType.brights);
}