---
description: >-
  Hexadecimal ranglar quyidagilar bilan ifodalanadi: #RRGGBB, bu yerda RR
  (qizil), GG (yashil) va BB (ko'k) o'n oltilik (hexadecimal) butun sonlar rang
  komponentlarini belgilaydi.
---

# HEX

## <mark style="color:green;">HEX rang qiymatlari</mark>

HTMLda rangni quyidagi shaklda o'n oltilik qiymatdan foydalangan holda ifodalash mumkin:

**#**_**rrggbb**_

Bu yerda rr (qizil), gg (yashil) va bb (ko'k) 00 va ff o'rtasidagi o'n oltilik qiymatlardir (bu o'nlik kasr 0-255 bilan bir xil).

Masalan, #ff0000 qizil rangda ko'rsatiladi, chunki qizil rang eng yuqori qiymat (ff)ga ega, qolgan ikkitasi (yashil va ko'k) 00 ga deb belgilangan.

Yana bir misol, #00ff00 yashil rangda ko'rsatiladi, chunki yashil rang eng yuqori qiymat (ff)ga ega, qolgan ikkitasi (qizil va ko'k) 00 deb belgilangan.

Qora rangni chiqarish uchun barcha parametrlarini 00 qiling, masalan: #000000.

Oq rangni chiqarish uchun barcha rang parametrlarini ff qiling, masalan: #ffffff.

Quyidagi HEX qiymatlarini aralashtirish orqali tajriba qilib ko'ring:

<figure><img src="https://1205461495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqA16xzuzJkS1GYbYJ5OX%2Fuploads%2Fgit-blob-cc80c779aa61aee705b3db51209e29d68e427f54%2Fimage%20(781).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1205461495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqA16xzuzJkS1GYbYJ5OX%2Fuploads%2Fgit-blob-51287222b3b3e4902e3e4904966b70efc54495b8%2Fimage%20(376).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1205461495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqA16xzuzJkS1GYbYJ5OX%2Fuploads%2Fgit-blob-d224e461e89ca866925291adc83cc7e508e29490%2Fimage%20(419).png?alt=media" alt=""><figcaption></figcaption></figure>

{% embed url="https://www.w3schools.com/html/tryit.asp?filename=tryhtml_color_hex" %}

## <mark style="color:green;">Kulrang soyalar</mark>

Kulrang soyalar odatda uchta parametrga bir xil qiymat berish orqali amalga oshiriladi:

<figure><img src="https://1205461495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqA16xzuzJkS1GYbYJ5OX%2Fuploads%2Fgit-blob-a24dd1208a77c84cd6eaab3c3279ffaa61faf31c%2Fimage%20(430).png?alt=media" alt=""><figcaption></figcaption></figure>

{% embed url="https://www.w3schools.com/html/tryit.asp?filename=tryhtml_color_hex_gray" %}
