Skip to main content

color_name_picker 1.0.0 copy "color_name_picker: ^1.0.0" to clipboard
color_name_picker: ^1.0.0 copied to clipboard

A Flutter color picker library that returns color names with hex codes. Supports multiple picker types including Material, Block, Wheel, and HSV pickers.

Color Name Picker 🎨 #

pub package License: MIT Flutter

A comprehensive Flutter color picker library that returns color names with hex codes. Supports multiple picker types and provides human-readable color names.

Features #

  • Multiple Picker Types - Material, Block, Slide, and Adaptive pickers
  • Color Name Extraction - Get human-readable color names
  • Hex Code & ARGB Values - Extract technical color information
  • Easy to Use - Simple API with flexible customization
  • Opacity Support - Full transparency/opacity control

How to Use #

Basic Usage #

import 'package:color_name_picker/color_name_picker.dart';

final ColorResult? result = await ColorNamePicker.showColorPicker(
  context: context,
  initialColor: Colors.blue,
  pickerType: PickerType.adaptivePicker,
);

if (result != null) {
  print('Hex: ${result.hexCode}');
  print('Name: ${result.colorName}');
  print('ARGB: ${result.argbValue}');
}

Direct Conversion #

// Convert Color to ColorResult
ColorResult result = ColorNamePicker.colorToResult(Colors.blue);

// Convert hex string to ColorResult
ColorResult result = ColorNamePicker.hexToResult('#FF0000');

Picker Types #

    PickerType.materialPicker - Material Design color picker

    PickerType.blockPicker - Block style color picker

    PickerType.wheelPicker - Color wheel picker

    PickerType.adaptivePicker - Adaptive picker with multiple options

Advanced Usage #

final ColorResult? result = await ColorNamePicker.showColorPicker(
  context: context,
  initialColor: Colors.green,
  pickerType: PickerType.blockPicker,
  dialogTitle: 'Select Theme Color',
  enableOpacity: true,
  showColorCode: true,
  showColorName: true,
  showLabel: true,
);

About #

Bishal Maji

  • GitHub: @bishalmaji
  • Pub.dev: color_name_picker
2
likes
0
points
40
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter color picker library that returns color names with hex codes. Supports multiple picker types including Material, Block, Wheel, and HSV pickers.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

colornames, flex_color_picker, flutter, flutter_colorpicker, readme_helper

More

Packages that depend on color_name_picker