API Reference color

color

Basic A-RGB Color class.

Source: honeybee_ph_utils/color.py


PhColor

An ARGB color with integer channel values in the range 0-255.

Attributes

AttributeTypeDescription
aintAlpha channel (0 = fully transparent, 255 = fully opaque).
rintRed channel.
gintGreen channel.
bintBlue channel.

Methods

classmethod from_argb(a, r, g, b)

Create a PhColor from explicit alpha, red, green, and blue values.

ArgTypeDescription
aintAlpha channel value (clamped to 0-255).
rintRed channel value (clamped to 0-255).
gintGreen channel value (clamped to 0-255).
bintBlue channel value (clamped to 0-255).

Returns: PhColor

classmethod from_rgb(r, g, b)

Create a fully opaque PhColor from red, green, and blue values.

ArgTypeDescription
rintRed channel value (clamped to 0-255).
gintGreen channel value (clamped to 0-255).
bintBlue channel value (clamped to 0-255).

Returns: PhColor

classmethod from_system_color(color)

Create a PhColor from a .NET System.Drawing.Color.

ArgTypeDescription
colorDrawing.ColorThe .NET color to convert.

Returns: PhColor