Last updated:
0 purchases
ncscolor
NCSColor #
A simple Dart package to convert NCS-color to his RGB, HSL, and HEX value and used to convert RGB to HSL and RGB to HEX.
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
ncscolor: any
copied to clipboard
Get the package using your IDE's GUI or via command line with
$ pub get
copied to clipboard
Import the color.dart file in your app
import 'package:ncscolor/ncscolor.dart';
copied to clipboard
Usage #
To convert ncs-color to rgb
NCSColor(ncsCode: '2060-R60B').toRgb(); //return {r:164, g:58, b:214}
copied to clipboard
To convert ncs-color to hsl
NCSColor(ncsCode: '2060-R60B').toHsl(); //return {h:281, s:66%, l:53%}
copied to clipboard
To convert ncs-color to hex
NCSColor(ncsCode: '2060-R60B').toHex(); //return #a43ad6
copied to clipboard
To convert rgb to hsl
ColorConvert.rgbToHsl(r: 164,b: 58,g:214); //return {h:281, s:66%, l:53%}
copied to clipboard
To convert rgb to hex
ColorConvert.rgbToHex(r: 164,b: 58,g:214); //return #a43ad6
copied to clipboard
Screenshots #
To online test (w3schools)
http://www-db.deis.unibo.it/courses/TW/DOCS/w3schools/colors/colors_converter.asp-color=ncs(4040-R90B).html
W3Color JavaScript Library
The JavaScript library used in the color converter can be downloaded from
http://www.w3schools.com/lib/w3color.js
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.