Companion object for the Hex4 case class that provides utility methods and functionality for working with Hex4 instances, including creation, parsing, and rendering.
Attributes
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The names of the product elements.
Attributes
- Inherited from:
- Mirror
The name of the type.
The name of the type.
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Constructs a Hex4 instance using the specified alpha, red, green, and blue color components.
Constructs a Hex4 instance using the specified alpha, red, green, and blue color components.
Value parameters
- alpha
-
the alpha component represented as a string
- blue
-
the blue component represented as a string
- green
-
the green component represented as a string
- red
-
the red component represented as a string
Attributes
- Returns
-
a
Hex4instance created from the provided color component values
Constructs a Hex4 instance by parsing a single string containing the concatenated two-character hexadecimal representations of the alpha, red, green, and blue components.
Constructs a Hex4 instance by parsing a single string containing the concatenated two-character hexadecimal representations of the alpha, red, green, and blue components.
Value parameters
- s
-
A string containing exactly 8 characters, where the first two characters represent the alpha component, the next two represent the red component, the following two represent the green component, and the last two represent the blue component.
Attributes
- Returns
-
A
Hex4instance created from the parsed hexadecimal component values.
Implicits
Implicits
Provides an implicit Extractor[Hex4] instance for converting a CharSequence into a Hex4 instance. The conversion is performed by mapping the CharSequence to its string representation and then creating a Hex4 using the string constructor of Hex4.
Provides an implicit Extractor[Hex4] instance for converting a CharSequence into a Hex4 instance. The conversion is performed by mapping the CharSequence to its string representation and then creating a Hex4 using the string constructor of Hex4.
This extractor is named "extractorHex4".
Attributes
An implicit Renderer instance for the Hex4 type.
An implicit Renderer instance for the Hex4 type.
This renderer transforms a Hex4 object into its hexadecimal string representation by invoking the overridden toString method of Hex4. The process is wrapped in a Try to handle potential exceptions during rendering.
The ^^ operator is used to assign the name "rendererHex4" to the renderer instance.