ColorizeNumber

ColorizeNumber ColorizeNumber License

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

SocialPreview

Download on NuGet gallery

Description

ColorizeNumber - Bodrum Papatya helps you to visualize numeric data.

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)

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

Version History

See Changelog

Task list

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