VegaRise.NET
Back to DOM

IDuoToneInterface

Definition

Namespace
DOM.Elements.Graphics.Colors
Assembly
DOM.dll

Defines the contract for a duo-tone color mapping.

Remarks

A duo-tone maps an image onto two colors: a dark color (Color1) and a light color (Color2). Intermediate image values are interpolated between them.

Examples

csharp
1// 1. Simple blue-to-white duo-tone
2IDuoTone duo = new DuoTone { Color1 = Color.DarkBlue, Color2 = Color.White };
3
csharp
1// 2. Sepia duo-tone
2IDuoTone duo = new DuoTone { Color1 = new Color("#3B2417"), Color2 = new Color("#F4E6C8") };
3
csharp
1// 3. High-contrast duo-tone
2IDuoTone duo = new DuoTone { Color1 = Color.Black, Color2 = Color.Red };
3
csharp
1// 4. Attach to a picture fill
2var fill = new PictureOrTextureFill { DuoTone = new List<IDuoTone> { duo } };
3

Properties

Color1

Gets or sets the dark color of the duo-tone mapping.

Color2

Gets or sets the light color of the duo-tone mapping.

VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.