Project

ChartForgeX

Render deterministic charts, dashboards, topology, hierarchy, and report visuals directly from .NET.

Stars 45
Forks 2
NuGet downloads 48,107
Release ChartForgeX-v1.7.0
Language: HTML Updated: 2026-09-02

API Reference

Class

ChartColor

Namespace ChartForgeX.Primitives

Represents an RGBA color used by ChartForgeX renderers.

Inheritance

  • Object
  • ChartColor

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

ChartColor(System.Byte r, System.Byte g, System.Byte b, System.Byte a) #

Initializes a new instance of the ChartColor struct.

Parameters

r System.Byte required
The red channel.
g System.Byte required
The green channel.
b System.Byte required
The blue channel.
a System.Byte required
The alpha channel.

Methods

Deconstruct(System.Byte@ r, System.Byte@ g, System.Byte@ b, System.Byte@ a) #

Deconstructs the color into red, green, blue, and alpha channels.

Parameters

r System.Byte@ required
The red channel.
g System.Byte@ required
The green channel.
b System.Byte@ required
The blue channel.
a System.Byte@ required
The alpha channel.
FromArgb 3 overloads
FromArgb(System.Byte a, System.Byte r, System.Byte g, System.Byte b) #

Creates a color from explicit alpha, red, green, and blue channels.

Parameters

a System.Byte required
The alpha channel.
r System.Byte required
The red channel.
g System.Byte required
The green channel.
b System.Byte required
The blue channel.

Returns

A chart color.

FromArgb(System.UInt32 argb) #

Creates a color from a packed 0xAARRGGBB value.

Parameters

argb System.UInt32 required
The packed ARGB color.

Returns

A chart color.

FromArgb(System.Int32 argb) #

Creates a color from a packed 0xAARRGGBB value.

Parameters

argb System.Int32 required
The packed ARGB color.

Returns

A chart color.

FromHex(System.String hex) #

Creates a color from #RGB, #RGBA, #RRGGBB, or #RRGGBBAA notation.

Parameters

hex System.String required
The hexadecimal color string.

Returns

A chart color.

FromRgb(System.Byte r, System.Byte g, System.Byte b) #

Creates an opaque RGB color.

Parameters

r System.Byte required
The red channel.
g System.Byte required
The green channel.
b System.Byte required
The blue channel.

Returns

An opaque chart color.

FromRgba 2 overloads
FromRgba(System.Byte r, System.Byte g, System.Byte b, System.Byte a) #

Creates a color with an explicit alpha channel.

Parameters

r System.Byte required
The red channel.
g System.Byte required
The green channel.
b System.Byte required
The blue channel.
a System.Byte required
The alpha channel.

Returns

A chart color.

FromRgba(System.UInt32 rgba) #

Creates a color from a packed 0xRRGGBBAA value.

Parameters

rgba System.UInt32 required
The packed RGBA color.

Returns

A chart color.

Parse(System.String value) #

Parses a named color or a hexadecimal color string.

Parameters

value System.String required
The named color or hexadecimal color string.

Returns

A chart color.

ToArgb() #

Converts the color to a packed 0xAARRGGBB value.

Returns

The packed ARGB color.

ToArgbInt32() #

Converts the color to a packed 0xAARRGGBB signed integer.

Returns

The packed ARGB color as a signed integer.

ToCss() #

Converts the color to a CSS color string.

Returns

A hexadecimal or rgba CSS color string.

ToHex() #

Converts the color to a hexadecimal RGB string.

Returns

A CSS-compatible hexadecimal color string.

ToHexRgba() #

Converts the color to a hexadecimal RGBA string.

Returns

A CSS-compatible hexadecimal color string with alpha.

ToRgba() #

Converts the color to a packed 0xRRGGBBAA value.

Returns

The packed RGBA color.

TryFromHex(System.String hex, ChartForgeX.Primitives.ChartColor@ color) #

Attempts to create a color from #RGB, #RGBA, #RRGGBB, or #RRGGBBAA notation.

Parameters

hex System.String required
The hexadecimal color string.
color ChartForgeX.Primitives.ChartColor@ required
The parsed chart color.

Returns

True when parsing succeeds.

TryParse(System.String value, ChartForgeX.Primitives.ChartColor@ color) #

Attempts to parse a named color or a hexadecimal color string.

Parameters

value System.String required
The named color or hexadecimal color string.
color ChartForgeX.Primitives.ChartColor@ required
The parsed chart color.

Returns

True when parsing succeeds.

WithAlpha(System.Byte alpha) #

Creates a copy of this color with a different alpha channel.

Parameters

alpha System.Byte required
The alpha channel.

Returns

A chart color with the requested alpha channel.

WithOpacity(System.Double opacity) #

Creates a copy of this color with opacity expressed as a unit interval.

Parameters

opacity System.Double required
The opacity from zero to one.

Returns

A chart color with the requested opacity.

Properties

Transparent #

Gets a fully transparent color.

White #

Gets opaque white.

Black #

Gets opaque black.

Fields

R #

Gets the red channel.

G #

Gets the green channel.

B #

Gets the blue channel.

A #

Gets the alpha channel.