complimentary_colors 1.0.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 71

Complimentary Colors Build Status

A Dart package for finding complimentary colors.

Installation

  1. Add this to your package's pubspec.yaml file:
dependencies:
  complimentary_colors: any
  1. Get the package using your IDE's GUI or via command line with
$ pub get
  1. Import the complimentary_colors.dart file in your app
import 'package:complimentary_colors/complimentary_colors.dart';

Usage

To get the complimentary color of a hex value

HexColor givenColor = new HexColor("FF0000");
HexColor complimentaryColor = CalculateComplimentaryColor.fromHex(givenColor)

To get the complimentary color of a hsl value

HslColor givenColor = new HslColor(270, 100, 100);
HslColor complimentaryColor = CalculateComplimentaryColor.fromHsl(givenColor)

To get the complimentary color of a rgb value

RgbColor givenColor = new RgbColor(270, 100, 100);
RgbColor complimentaryColor = CalculateComplimentaryColor.fromRgb(givenColor)

0.0.1

  • Initial publish with support of hex and hsl colors.

0.0.2

  • Added example usage. Formatted code to comply with dartfmt.

0.0.3

  • Added support for rgb colors.

0.0.4

  • Slightly better documentation.

0.0.5

  • Example useage now actually runs in pub.

1.0.0

  • Added support for Dart 2.

example/example.dart

import 'package:color/color.dart';
import 'package:complimentary_colors/complimentary_colors.dart';

main() {
  HexColor givenHexColor = new HexColor("FF0000");
  HslColor givenHslColor = new HslColor(270, 100, 100);
  RgbColor givenRgbColor = new RgbColor(255, 132, 91);

  //Get the complimentary color of "FF0000";
  HexColor complimentaryHexColor =
      CalculateComplimentaryColor.fromHex(givenHexColor);
  print("givenHexColor = $givenHexColor");
  print("complimentaryHexColor = $complimentaryHexColor");

  //Get the complimentary color of Hsl(270, 100, 100);
  HslColor complimentaryHslColor =
      CalculateComplimentaryColor.fromHsl(givenHslColor);
  print("givenHslColor = $givenHslColor");
  print("complimentaryHslColor = $complimentaryHslColor");

  //Get the complimentary color of Rgb(255, 132, 91);
  RgbColor complimentaryRgbColor =
      CalculateComplimentaryColor.fromRgb(givenRgbColor);
  print("givenRgbColor = $givenRgbColor");
  print("complimentaryRgbColor = $complimentaryRgbColor");
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  complimentary_colors: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:complimentary_colors/complimentary_colors.dart';
  
Version Uploaded Documentation Archive
1.0.1 Sep 3, 2018 Go to the documentation of complimentary_colors 1.0.1 Download complimentary_colors 1.0.1 archive
1.0.0 Aug 15, 2018 Go to the documentation of complimentary_colors 1.0.0 Download complimentary_colors 1.0.0 archive
0.0.6 Aug 15, 2018 Go to the documentation of complimentary_colors 0.0.6 Download complimentary_colors 0.0.6 archive
0.0.5 Jul 25, 2018 Go to the documentation of complimentary_colors 0.0.5 Download complimentary_colors 0.0.5 archive
0.0.4 Jul 17, 2018 Go to the documentation of complimentary_colors 0.0.4 Download complimentary_colors 0.0.4 archive
0.0.3 Apr 26, 2018 Go to the documentation of complimentary_colors 0.0.3 Download complimentary_colors 0.0.3 archive
0.0.2 Apr 26, 2018 Go to the documentation of complimentary_colors 0.0.2 Download complimentary_colors 0.0.2 archive
0.0.1 Apr 26, 2018 Go to the documentation of complimentary_colors 0.0.1 Download complimentary_colors 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
49
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Sep 18, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.3

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:complimentary_colors/complimentary_colors.dart.

Issues and suggestions

Use constrained dependencies.

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: color.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
color 2.1.0
Dev dependencies
test ^1.0.0