Last updated:
0 purchases
scolors
SColors #
A playful dart package to play with colors and get a lighter and darker color from an existing color you provide.
Usage #
To use this plugin, add scolors as a dependency in your pubspec.yaml file.
dependencies:
scolors: ^1.0.0
copied to clipboard
Example #
Import the library.
import 'package:scolors/scolors.dart';
copied to clipboard
Use it anywhere you want to create a Color lighter or darker in cotrast:
// get opposite color of a already defined color:
Color? opposite = SColors.oppositeColor(colorStr: '#6a87e3');
// get lighter color of a already defined color with factor:
Color? lighter = SColors.lighterColor(.3, colorInt: 0xFF6A87E3);
// get darker color of an already defined color with factor:
Color? darker = SColors.darkerColor(.7, color: const Color(0xff6a87e3));
// get hsv color of an already defined color:
Color? hsv = SColors.rgbToHsv(colorStr: '#6a87e3');
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.