Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

meokullu/ColorizeNumber

ColorizeNumber

ColorizeNumber ColorizeNumber License

ColorizeNumber - Bodrum Papatya is a project to visualize numeric data.

SocialPreview

Description

ColorizeNumber - Bodrum Papatya helps you to visualize numeric data.

How to download

Release: Latest release

Download on NuGet gallery

.NET CLI:

dotnet add package ColorizeNumber

Example Usage

TestColorizeNumber()
{
 // Data - 25 charachters
 string dataText = "1122334455667788990012345";
 // Data to Frame (25 byte length)
 Frame frame = CreateFrameFromData(dataText, 5, 5, colorizeFunction: ColorizeFunc);
 // Frame to Bitmap (5x5)
 Bitmap bitmap = CreateBitmap(frame);
 // Saving bitmap.
 bitmap.Save("./ColorizeNumberTest.bmp", ImageFormat.Bmp);
 // EasySaver.BitmapFile is providing saving methods for bitmap files.
 // It automatically saves bitmap with specified naming formats.
 // https://github.com/meokullu/EasySaver/tree/master/EasySaver.BitmapFile
 // https://www.nuget.org/packages/EasySaver.BitmapFile/
 // Save(Bitmap bitmap)
 // SaveToFolder(Bitmap bitmap)
}
CreateFrameRandomly(int width, int height);
CreateFrameRandomly(int width, int height, RGBColor[] colorList)

2024年02月26日-07-53-44-759

CreateFrameRandomly(int width, int height)

2024年02月26日-07-54-08-927

Build your own colorize function.

RGBColor MyColorizeFunc(byte number)
{
 if (number < 5) // If number is 0, 1, 2, 3, 4 returns white color.
 {
 return new RGBColor(red: 255, green: 255, blue: 255);
 }
 else // If number is 5, 6, 7, 8, 9 returns black color.
 {
 return new RGBColor(red: 0, green: 0, blue: 0);
 }
}
GetRandomColor();
GetRandomColor(RandomColorLimit limits)

Tip

To save reporting result easily, you can use EasySaver.BitmapFile.

dotnet add package EasySaver.BitmapFile

To check listed methods, example of output visit wiki page. ColorizeNumber Wiki

Version History

See Changelog

Task list

  • Create an issue or check task list: Issues

Licence

This repository is licensed under the "MIT" license. See MIT license.

Authors & Contributing

If you'd like to contribute, then contribute. contributing guide.

Contributors

Help

Twitter: Enes Okullu @enesokullu

About

ColorizeNumber - Bodrum Papatya, visualizes numeric data into colors which creates an image.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /