พัฒนาเว็บ
Color Converter
แปลงสีระหว่าง HEX, RGB, HSL, HSV/HSB และ CMYK — ป้อนค่าในช่องใดก็ได้ ช่องที่เหลือจะอัปเดตทันที
The same color can be written differently depending on context: HEX and RGB are convenient for code, HSL is intuitive for picking a hue and lightness, and CMYK is for print. This tool converts between all of them at once.
How to use it
- Enter a value in any field (HEX, RGB, HSL, HSV/HSB, or CMYK) — every other format updates instantly.
- The "random color" button generates a random hue for quickly browsing a palette.
- Copy the format you need with one click to paste into CSS or a graphics editor.
Which format to use when
- HEX — a compact notation for CSS and design systems (#4453b8).
- RGB — when you need transparency via rgba() or programmatic access to individual color channels.
- HSL — the easiest for manual tuning: lighten or darken a color by changing just one value.
- CMYK — for materials headed to print, where colors mix subtractively, unlike the additive RGB used on screens.
Things to keep in mind
CMYK on screen is only an approximation — the exact printed color depends on the printer, paper, and color profile used.
Conversion between color spaces isn't always exact for extreme, highly saturated colors, due to differences in gamut coverage between models.
บทความเกี่ยวกับเครื่องมือนี้: HEX, RGB, HSL: ทำไมสีจึงมีวิธีเขียนหลายแบบ
คำถามที่พบบ่อย
ตัวแปลงจัดการกับช่องอัลฟา (ความโปร่งใส) อย่างไร?
อัลฟารองรับใน HEX (#RRGGBBAA), RGBA และ HSLA — สิ่งที่คุณป้อนจะถูกส่งต่อไปยังรูปแบบอื่นที่รองรับความโปร่งใส ในขณะที่รูปแบบที่ไม่มีช่องอัลฟา เช่น CMYK ธรรมดา จะเพิกเฉยต่อมันเฉย ๆ
ทำไมค่าถึงเปลี่ยนเล็กน้อยหลังจากแปลงเป็น CMYK แล้วกลับมาเป็น HEX?
CMYK เป็นโมเดลที่เน้นการพิมพ์โดยไม่มีสูตรตายตัวเดียวสำหรับการแปลงไปมากับ RGB ดังนั้นการแปลงไปกลับอาจทำให้ค่าคลาดเคลื่อนจากการปัดเศษหนึ่งหรือสองหน่วย แต่ในทางสายตาสีจะยังคงเหมือนเดิม
ข้อมูลสีของฉันถูกส่งไปที่ไหนหรือไม่?
ไม่ การแปลงทั้งหมดเกิดขึ้นในเครื่องของคุณผ่านเบราว์เซอร์ด้วย JavaScript ไม่มีการอัปโหลดไปยังเซิร์ฟเวอร์
OKLCH ต่างจาก HSL อย่างไร?
OKLCH อธิบายสีผ่านความสว่าง (L) ความอิ่มตัวของสี (C) และโทนสี (H) แต่ต่างจาก HSL ตรงที่คำนึงถึงวิธีที่ดวงตามนุษย์รับรู้ความสว่างจริง ๆ — การเปลี่ยนค่า L ใน OKLCH จะไม่บิดเบือนความอิ่มตัวของสีที่รับรู้ได้ ทำให้การไล่โทนสีดูสม่ำเสมอกว่า
สีที่ "อยู่นอกช่วงสี" (out of gamut) หมายความว่าอย่างไร?
สีบางสีในปริภูมิสีที่กว้างอย่าง OKLCH หรือ Display P3 ไม่สามารถแสดงผลได้จริงบนจอแสดงผลที่รองรับเฉพาะ sRGB — ในกรณีนี้เบราว์เซอร์จะแทนที่ด้วยสีที่ใกล้เคียงที่สุดในช่วงสีที่รองรับ