https://github.com/lexz-08/sharpblend
Can blend either 2 colors or more than 2 together with a certain amount of each first one left over.
https://github.com/lexz-08/sharpblend
blending color-blending colors csharp windows
Last synced: 2 months ago
JSON representation
Can blend either 2 colors or more than 2 together with a certain amount of each first one left over.
- Host: GitHub
- URL: https://github.com/lexz-08/sharpblend
- Owner: Lexz-08
- Created: 2021-03-02T07:11:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-02T00:50:25.000Z (about 5 years ago)
- Last Synced: 2025-02-25T02:18:13.077Z (over 1 year ago)
- Topics: blending, color-blending, colors, csharp, windows
- Language: C#
- Homepage: https://github.com/Lexz-08/SharpBlend/
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## SharpBlend
### Description
Can blend either 2 colors or more than 2 together with a certain amount of each first one left over.
### How To Use
```csharp
// Assuming you have the System.Drawing namespace referenced.
// Change the colors passed into the function's parameters to whatever colors you'd like, unless you want those.
Color BlendedColor = Blender.BlendColors(Color.Orange, Color.Magenta, 0.5);
// For Console Application users...
IntPtr DesktopHandle = IntPtr.Zero;
using (Graphics GFX = Graphics.FromHwnd(DesktopHandle)
{
GFX.FillRectangle(new SolidBrush(BlendedColor), new Rectangle(10, 10, 10, 10));
}
// For Windows Forms Application users...
// The BackColor represents the BackColor property of the Form window.
BackColor = BlendedColor;
```
### Download
[SharpBlend.dll](https://github.com/Lexz-08/SharpBlend/releases/download/sharpblend/SharpBlend.dll)