Color Space
Color Space (Color Model)
A color space is a specific organization of colors that defines the gamut (range) of representable colors. sRGB is the web standard, Adobe RGB covers more greens and cyans for print, and Display P3 serves modern wide-gamut displays.
Chi tiết kỹ thuật
Color spaces are defined by primary chromaticities, a white point, and a transfer function (gamma). sRGB uses D65 illuminant with BT.709 primaries and a ~2.2 gamma curve.
Ví dụ
```javascript
// Convert RGB to HSL
function rgbToHsl(r, g, b) {
r /= 255; g /= 255; b /= 255;
const max = Math.max(r, g, b), min = Math.min(r, g, b);
const l = (max + min) / 2;
let h = 0, s = 0;
if (max !== min) {
const d = max - min;
s = l > 0.5 ? d/(2-max-min) : d/(max+min);
}
return [h, s, l];
}
```
Công cụ liên quan
C
Color Palette Generator
C
Color Shade Generator
N
Nén Ảnh
T
Thay Đổi Kích Thước Ảnh
C
Cắt Ảnh
X
Xoay Ảnh
L
Lật Ảnh
C
Chuyển Đổi Ảnh
W
Watermark Ảnh
S
SVG sang PNG
Ả
Ảnh Sang Base64
B
Bo Góc
T
Thêm Viền
B
Bộ Lọc Ảnh
Đ
Điều Chỉnh Ảnh
L
Làm Mờ Ảnh
L
Làm Nét Ảnh
T
Tạo Hình Vuông
G
Grayscale Image
S
Sepia Image
P
Pixelate Image
S
Strip Image Metadata