LabelColor
com.worxbend.codeberg4s.issues.LabelColor$package.LabelColor
object LabelColor
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LabelColor.type
Members list
In this article
Parses a label colour.
Parses a label colour.
Trims surrounding whitespace, drops a leading #, and lowercases the digits. Rejects anything that is not three or six hexadecimal digits.
Checked by counting the digits and then scanning them, rather than by a regular expression. Every label Forgejo returns carries a colour, so this runs once per label on every issue and label listing; a Pattern match allocates a Matcher and a match result per call, and the grammar it encodes — a length and an alphabet — is cheaper to state directly.
the normalised colour, or a ValidationError on the "labelColor" field
The colour with a leading #, the form Forgejo documents for CreateLabelOption.color.
The colour with a leading #, the form Forgejo documents for CreateLabelOption.color.
The colour as bare lowercase hexadecimal digits, without a # — the form Forgejo returns.
The colour as bare lowercase hexadecimal digits, without a # — the form Forgejo returns.