了解CSS颜色和单位 HEX、RGB和HSL颜色格式 CSS支持多种颜色格式。 <strong>RGB</strong>对每个通道使用0到255的十进制值。 <strong>HSL</strong>对设计师来说最直观。 CSS Named Colors CSS provides 147 named colors like coral, steelblue, and rebeccapurple. While convenient for prototyping, named colors offer limited precision. Converting a CSS color name to HEX or RGB gives you exact values you can fine-tune for production use. 印刷设计的CMYK <strong>CMYK</strong>是印刷的标准颜色模型。 设计工具中的HSV <strong>HSV</strong>是Photoshop、Figma和Sketch的原生颜色模型。 PX vs REM: CSS单位解释 <strong>像素(PX)</strong>是绝对单位。 将像素除以16得到REM值。 <strong>EM单位</strong>相对于父元素的字体大小,而非根元素。 1rem = 16px (default browser setting) 1em = parent font-size (context-dependent) 0.75rem = 12px — common for small/caption text 1.25rem = 20px — common for subheadings 2rem = 32px — common for section headings 为什么使用CSS转换器? 手动转换繁琐且容易出错。 Instant results — paste a value and get the converted output immediately, no formulas needed. Copy-ready output — every result includes a one-click copy button with properly formatted CSS syntax. Color preview — see a live swatch of the converted color to visually confirm accuracy. No installation — works in any browser, on any device. No extensions, downloads, or signups. Developer-friendly — shareable URLs with pre-filled values for easy team collaboration. Common CSS Conversion Workflows Design handoff: Figma and Sketch export colors as HEX. Convert to RGB or HSL if your codebase uses those formats. Dark mode generation: Take your light-mode HSL palette, adjust lightness values, and convert back to HEX. Accessibility checks: Convert colors to RGB to calculate contrast ratios using the WCAG luminance formula. Legacy migration: Convert pixel-based layouts to rem-based responsive systems during refactors. Cross-browser debugging: Quickly convert colors to match your source code format. Supported Conversions From To Category HEXRGB, HSL, RGBA, CSS NameColor RGBHEX, HSLColor HSLHEX, RGBColor RGBAHEXColor CSS NameHEX, RGB, HSLColor PXREMUnit REMPXUnit