colorfy 2.1.0 copy "colorfy: ^2.1.0" to clipboard
colorfy: ^2.1.0 copied to clipboard

Terminal string styling done right with Dart.

example/colorfy_example.dart

import 'package:colorfy/colorfy.dart';

void main() {
  print(color('Error').red().bold());
  print(color('Warning').yellow().italic());
  print(color('Success').green().underline().bold());

  print(color('Hello ').red() + 'World '+ color('!').green().bold());

  print(color('Hello World ').blue().bgRed().bold());

 print(color('✔ SUCCESS', ['-Operation completed']).green().bold());

 // Nest styles
 print(color('hello ', [color('world').bgRed(), '!']) );

 print(
  color("i am green line ", [
    color("witth a blue substring ").bgBlue().underline(),
    'that become again!'
  ]).green()
 );

 print('''
CPU : ${color('90%').red()}
RAM : ${color('70%').yellow()}
DISK: ${color('50%').green()}
''');

// Use RGB colors in terminal emulators that support it.
print(color('Underlined reddish color').rgb(123, 45, 67).bold());
print(color('Bold Grey').hex('#DEADED'));

//themes

final error = color('').red().bold();
final warning = color('').hex('#FFA500');

print(color(''));
print(error.apply('This is an error message!'));
print(warning.apply('This is a warning message!'));

final name = 'KABULU';
print(color('Hello %s').green().format([name]));
}
3
likes
135
points
44
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Terminal string styling done right with Dart.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on colorfy