Skip to content

Just a small lib that basically changes rgb values to hex values

License

Notifications You must be signed in to change notification settings

MinaSameh1/dart_rgb_hex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dart RGB hex

This is a small library that basically converts RGB values to hexadecimal values, you can use it with flutter or dart.

Using it

clone the repo and just import it

import 'rgb.dart';

// use it
rgbToHex( 200, 200, 200 ); // returns #C8C8C8

You can also clone it in your project root and then import it, However keep in mind that that isn't best practice, and I wouldn't recommend doing that.

# In project/. 
git clone https://github.com/MinaSameh1/dart_rgb_hex.git 
// In project/bin/file.dart
import '../dart_rgb_hex/rgb.dart';

// use it
print(rgbToHex(64, 36, 36)); // outputs #402424

Tests

If you want to run the tests, first run this to get the test dependency:

dart pub get

Then

dart test testRGB.dart

I would recommend reading this if you want to get more into testing :)

The Effective Dart was used for writing documentation.

About

Just a small lib that basically changes rgb values to hex values

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages