FLUTTER ECOSYSTEM

mattrltrent/colorify

🎨 指定された動的シードから決定論的なランダムカラーを生成するシンプルなFlutterパッケージ。

colorify のプロジェクト画像
Stars
1
Forks
0
最終プッシュ(UTC)
2025/01/14
プロジェクト状態
公開中
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
言語C++CMakeDartSwiftCHTMLKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 4 件
  • flutter{"sdk":"flutter"}
  • crypto^3.0.6
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^4.0.0

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

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);
}