smartinspectpython.sicolor
Module: sicolor.py
Revision History
Date | Version | Description |
---|---|---|
2023/05/30 | 3.0.0.0 | Initial Version. |
2023/09/03 | 3.0.20.0 | Changed all alpha byte from 0xFF to 0x00 for all color definitions. |
Mimics the System.Drawing.Color class functionality.
Initializes a new instance of the class using a supplied known color value that represents the four ARGB components (alpha, red, green, and blue).
Arguments:
- value (int): Integer value that represents the ARGB components of the color.
Gets the alpha component value of this color structure.
0 is fully transparent, and 255 is fully opaque.
Gets the raw value of the color in hexadecimal form.
Returns a string value in the form of 0xAARRBBGG (e.g. 0x00FF0000).
Ensures the value for the named parameter (A,R,G, or B) is between 0 through 255.
Arguments:
- value (int): The value to check.
- name (str): The descriptove name of the value, used to identify the value in case of an exception.
Creates a SIColor structure from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.
Arguments:
- alpha (int): The alpha component. Valid values are 0 (fully transparent) through 255 (fully opaque).
- red (int): The red component. Valid values are 0 through 255.
- green (int): The green component. Valid values are 0 through 255.
- blue (int): The blue component. Valid values are 0 through 255.
Returns:
The SIColor that this method creates.
Raises:
- ArgumentException: alpha, red, green, or blue is less than 0 or greater than 255.
Creates a SIColor structure from the three RGB component (red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits. The alpha value is implicitly 255 (fully opaque).
Arguments:
- red (int): The red component. Valid values are 0 through 255.
- green (int): The green component. Valid values are 0 through 255.
- blue (int): The blue component. Valid values are 0 through 255.
Returns:
The SIColor that this method creates.
Raises:
- ArgumentException: red, green, or blue is less than 0 or greater than 255.
Pre-defined known color values.
System-defined color that has an ARGB value of #FFF0F8FF.
Gets a system-defined color that has an ARGB value of #FF6495ED.
Gets a system-defined color that has an ARGB value of #FF00008B.
Gets a system-defined color that has an ARGB value of #FF008B8B.
Gets a system-defined color that has an ARGB value of #FFA9A9A9.
Gets a system-defined color that has an ARGB value of #FFFF8C00.
Gets a system-defined color that has an ARGB value of #FF00BFFF.
Gets a system-defined color that has an ARGB value of #FF696969.
Gets a system-defined color that has an ARGB value of #.
Gets a system-defined color that has an ARGB value of #FFDCDCDC.
Gets a system-defined color that has an ARGB value of #FFE6E6FA.
Gets a system-defined color that has an ARGB value of #FFADD8E6.
Gets a system-defined color that has an ARGB value of #FFF08080.
Gets a system-defined color that has an ARGB value of #FF90EE90.
Gets a system-defined color that has an ARGB value of #FFD3D3D3.
Gets a system-defined color that has an ARGB value of #FF87CEFA.
Gets a system-defined color that has an ARGB value of #FFFFA500.
Gets a system-defined color that has an ARGB value of #FF8B4513.
Gets a system-defined color that has an ARGB value of #FF2E8B57.
Gets a system-defined color that has an ARGB value of #FFC0C0C0.
Gets a system-defined color that has an ARGB value of #FF87CEEB.
Gets a system-defined color that has an ARGB value of #FF708090.
Gets a system-defined color that has an ARGB value of #FFF5F5F5.
Gets a system-defined color that has an ARGB value of #FFFFFF00.