RGB color triplet
ID rgbcolor
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 its red, green and blue components: three integers from 0 to 255 separated by commas, either bare (220,220,220) or in the CSS functional notation rgb(220, 220, 220). Design tools, data exports and stylesheets use it; the hexadecimal form of the same color is hexcolor. The regexp does not cover percentages, 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
rgb- Quality
- 100/100
- Metacrafter rules
- no detection rule yet
- Supported by tools
- Auto-Type
Regular expression
^(?:rgb\(\s*(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\s*,\s*(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\s*,\s*(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\s*\)|(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\s*,\s*(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\s*,\s*(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))$
Python re syntax.
Examples
| Value | Description |
|---|---|
| 220,220,220 | CSS named color gainsboro |
| rgb(255, 99, 71) | CSS named color tomato |
| 0, 0, 0 | Black |
| 256,0,0 invalid | A component above 255 |
| #FF6347 invalid | Hexadecimal form |
Translations
| Language | Name | Description |
|---|---|---|
| Russian | Цвет RGB | Цвет, записанный тремя компонентами (красный, зелёный, синий) от 0 до 255. |
Sources
- wikipedia: https://en.wikipedia.org/wiki/RGB_color_model
- doc: https://www.w3.org/TR/css-color-4/#rgb-functions
- other: https://github.com/congy/AutoType/blob/master/data_release/rgb.txt
Use this record
- Page URL:
http://registry.apicrafter.io/datatype/rgbcolor - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/common/rgbcolor.yamlon GitHub