HSL color
ID hslcolor
Pattern of colorNot PIIcategoricalDraft
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Color written as hue, saturation and lightness: a hue angle from 0 to 360 degrees and two percentages from 0% to 100%, separated by commas, either bare (0, 100%, 50%) or in the CSS functional notation hsl(0, 100%, 50%). The regexp accepts whole numbers only, without the deg unit, an alpha channel or the space-separated syntax of CSS Color Level 4.
- Pattern of
- Color
color - Categories
- Common
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- AutoType benchmark
hsl- Quality
- 100/100
- Metacrafter rules
- no detection rule yet
- Supported by tools
- Auto-Type
Regular expression
^(?:hsl\(\s*(?:360|3[0-5]\d|[12]\d\d|[1-9]?\d)\s*,\s*(?:100|[1-9]?\d)%\s*,\s*(?:100|[1-9]?\d)%\s*\)|(?:360|3[0-5]\d|[12]\d\d|[1-9]?\d)\s*,\s*(?:100|[1-9]?\d)%\s*,\s*(?:100|[1-9]?\d)%)$
Python re syntax.
Examples
| Value | Description |
|---|---|
| hsl(0, 100%, 50%) | Pure red |
| 120, 100%, 25% | Dark green |
| 0, 0%, 100% | White |
| 361, 50%, 50% invalid | Hue above 360 |
| 120, 100, 25 invalid | Saturation and lightness without % |
Translations
| Language | Name | Description |
|---|---|---|
| Russian | Цвет HSL | Цвет, записанный тоном (0–360°), насыщенностью и светлотой в процентах. |
Sources
- wikipedia: https://en.wikipedia.org/wiki/HSL_and_HSV
- doc: https://www.w3.org/TR/css-color-4/#the-hsl-notation
- other: https://github.com/congy/AutoType/blob/master/data_release/hsl.txt
Use this record
- Page URL:
http://registry.apicrafter.io/datatype/hslcolor - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/common/hslcolor.yamlon GitHub