Search Results for

    Show / Hide Table of Contents

    Class ColorHelper

    A static helper class for color manipulation.

    Inheritance
    System.Object
    ColorHelper
    Namespace: IronWord.Models.Extensions
    Assembly: IronWord.dll
    Syntax
    public static class ColorHelper : Object

    Methods

    ToHex(Color)

    Converts a Color object to its hexadecimal representation.

    Declaration
    public static string ToHex(this Color c)
    Parameters
    Type Name Description
    Color c

    The Color object to convert.

    Returns
    Type Description
    System.String

    The hexadecimal representation of the color, including alpha channel.

    Remarks

    This method considers the opacity of the color and adjusts the RGB values accordingly. This is essential for ensuring the correct hex code is generated for semi-transparent colors.

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronWord to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronWord free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.