Search Results for

    Show / Hide Table of Contents

    Class ColorContrast

    Color contrast tools

    Inheritance
    object
    ColorContrast
    Namespace: Terminaux.Colors.Transformation.Contrast
    Assembly: Terminaux.dll
    Syntax
    public static class ColorContrast

    Methods

    | Edit this page View Source

    GetContrastColorHalf(Color)

    Gets the color contrast appropriate for the specified color using the half white integer

    Declaration
    public static Color GetContrastColorHalf(this Color color)
    Parameters
    Type Name Description
    Color color

    Target color to work on

    Returns
    Type Description
    Color

    Black if the color is greater than half white; otherwise, false.

    | Edit this page View Source

    GetContrastColorNtsc(Color)

    Gets the color contrast appropriate for the specified color using the luma part of the YIQ color space (NTSC 1953)

    Declaration
    public static Color GetContrastColorNtsc(this Color color)
    Parameters
    Type Name Description
    Color color

    Target color to work on

    Returns
    Type Description
    Color

    Black if the luma info is less than or equal to 128, or white if greater than 128

    | Edit this page View Source

    IsSeeable(Color)

    Checks to see if the specified color is considered seeable

    Declaration
    public static bool IsSeeable(Color color)
    Parameters
    Type Name Description
    Color color

    The color to use

    Returns
    Type Description
    bool

    True if the specified color is considered "seeable." False otherwise.

    Exceptions
    Type Condition
    TerminauxException
    | Edit this page View Source

    IsSeeable(ColorType, int, int, int, int, ColorSettings?)

    Checks to see if the specified color is considered seeable

    Declaration
    public static bool IsSeeable(ColorType type, int colorLevel, int colorR, int colorG, int colorB, ColorSettings? settings = null)
    Parameters
    Type Name Description
    ColorType type

    The color type to use

    int colorLevel

    The color level that is in the range of 0-255

    int colorR

    The red color level

    int colorG

    The green color level

    int colorB

    The blue color level

    ColorSettings settings

    Settings to use

    Returns
    Type Description
    bool

    True if the specified color is considered "seeable." False otherwise.

    Exceptions
    Type Condition
    TerminauxException
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX