About this tool
Color is the primary vehicle for visual hierarchy, emotional branding, and UX accessibility in digital design. Web designers and frontend engineers require precision color picking, eyedropper sampling, and multi-format palette generation. This tool provides an interactive color canvas, system eyedropper extraction, real-time shade generation, and instant CSS export.
How to Use This Tool (Step-by-Step)
Pick or Sample Screen Color
Click and drag across the interactive gradient canvas, or activate the native Eyedropper API to sample any pixel from your desktop.
Fine-Tune Hue & Alpha Sliders
Slide the spectrum Hue bar to change colors and modulate the Alpha slider to refine transparency, viewing generated tonal shades.
Copy Format with One Click
The tool generates synchronized HEX, RGB, HSL, and Tailwind tokens. Click to paste production-ready color declarations into your project.
Native Browser Eyedropper
Leverages the modern EyeDropper API to sample colors directly from any open window or webpage without browser extensions.
Dynamic Tonal Palette Generator
Automatically calculates a 10-shade monochromatic palette (50–900 scale) from your chosen base color, perfectly mirroring Tailwind tokens.
100% Client-Side Privacy
Canvas and color mathematics run completely inside local browser memory with zero latency and zero intrusive advertisements.
Accessibility Standards & Color Pairing Tips
- •Design for color-blind accessibility: 8% of men experience red-green color blindness. Never rely solely on color to communicate state—pair with icons.
- •Avoid pure black #000000 in dark mode: High contrast white on pitch-black causes eye strain. Use dark slate greys (#121212, #0f172a) with 87% opacity white text.
- •Don't oversaturate: Vivid neon colors fatigue human eyes rapidly when used across broad backgrounds. Reserve saturated hues strictly for Call-to-Action buttons.
Code & Transformation Examples
Modern Design System Semantic Roles
• Primary (品牌主色) : #4F46E5 (Indigo - 用于主按钮、激活状态)
• Success (成功提示) : #10B981 (Emerald - 用于支付成功、表单通过)
• Warning (警示提醒) : #F59E0B (Amber - 用于风险提示、待办通知)
• Danger (危险错误) : #EF4444 (Rose - 用于删除警告、接口报错)一个优秀的 UI 设计系统通常遵循 60-30-10 法则:60% 背景中性底色、30% 辅助结构色、10% 点缀强调主色。* Consistent semantic color mapping reinforces clean visual hierarchies.
Browser Native EyeDropper API Snippet
async function pickColor() {
if (!window.EyeDropper) {
alert("当前浏览器暂不支持原生吸色 API");
return;
}
const eyeDropper = new EyeDropper();
const result = await eyeDropper.open();
console.log("吸取的色值:", result.sRGBHex); // 如 #4f46e5
}Chrome 95+ 与 Edge 现已全系支持 EyeDropper API,用户可跨越浏览器窗口自由吸取屏幕任意像素。* Enables native OS-level pixel sampling without heavy external canvas libraries.
Frequently Asked Questions
Q: Why does the eyedropper fail to open in some browsers?
A: The EyeDropper API is supported natively in Chromium browsers (Chrome, Edge, Opera). Safari and Firefox users can pick any color via the gradient palette canvas.
Q: Can the '#' symbol be omitted in CSS hex codes?
A: In CSS and HTML, '#' is mandatory syntax. However, URL query parameters and graphics software often omit '#' to prevent anchor navigation conflicts.
Q: Can I save my custom color history?
A: Yes. The tool automatically retains recently picked swatches in a history bar, safely persisted in your browser's local storage across sessions.