A HEX code packs three 8-bit numbers into six hexadecimal digits. Converting HEX to RGB means splitting those digits into pairs and reading each pair as a decimal number between 0 and 255 — exactly the values CSS, Figma and image editors expect.
Maitiro ekuverenga HEX kuenda ku RGB
- Bvisa # inotungamira uye, kana kodhi iine madhijithi matatu chete, pwanyazve rimwe nerimwe kaviri: #f53 inova #ff5533.
- Patsanura madhijithi matanhatu kuita mapeya matatu — RR, GG uye BB.
- Verenga peji rimwe nerimwe sesangano rebase-16 woachinja ku base 10: FF inova 255, 57 inova 87, 33 inova 51.
- Nyora mhinduro nhatu se rgb(R, G, B).
Muenzaniso wakashanda
Kushandurwa uku kwakaringana. HEX ne RGB zvinotsanangura iwo mamwe ma sRGB values mune imwe notation, saka hapana chinochinjwa kana kurasika kubva kune rimwe divi kuenda kune rimwe.
HEX and RGB explained
Chii chinonzi HEX?
A HEX code is a six-digit hexadecimal number that stores the red, green and blue channel of a color behind a leading #. Each pair of digits covers one channel, from 00 (none) to FF (full), which gives the same 16.7 million colors as RGB in a much shorter notation. HEX is the default in CSS, design tools and brand guidelines.
- Syntax:
- #RRGGBB
- Range:
- 00–FF per channel
- Yakanakira:
- CSS, design handoff, brand guidelines
Chii chinonzi RGB?
RGB inotsanangura ruvara sezviteshi zvitatu zverambi — red, green ne blue — imwe neimwe kubva pa 0 kusvika 255. Inoratidza maitiro anoshanda masikirini: ese matatu pa255 anopa chena, ese pa0 anopa nhema. RGB ndiyo sarudzo yakakodzera paunoda kuverenga nemavara, uye rgba() inowedzera kuvharika pamusoro.
- Syntax:
- rgb(R, G, B)
- Range:
- 0–255 per channel
- Yakanakira:
- code, canvas, transparency with rgba()
HEX to RGB reference table
Mavara eCSS anowanzo shandiswa, akashandurwa kubva kuHEX kuenda kuRGB.
| Ruvara | HEX | RGB |
|---|---|---|
| black | #000000 | rgb(0, 0, 0) |
| white | #FFFFFF | rgb(255, 255, 255) |
| red | #FF0000 | rgb(255, 0, 0) |
| lime | #00FF00 | rgb(0, 255, 0) |
| blue | #0000FF | rgb(0, 0, 255) |
| yellow | #FFFF00 | rgb(255, 255, 0) |
| orange | #FFA500 | rgb(255, 165, 0) |
| teal | #008080 | rgb(0, 128, 128) |
| purple | #800080 | rgb(128, 0, 128) |
| gray | #808080 | rgb(128, 128, 128) |