- Add API specification documentation - Add system specification document - Add UI mockups and documentation - Add utility modules (wifi)
211 lines
6.7 KiB
HTML
211 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Chromium Color Picker Demo</title>
|
|
<link rel="stylesheet" href="color-picker-chromium.css">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&family=Roboto+Mono&display=swap" rel="stylesheet">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
background: white;
|
|
border-radius: 12px;
|
|
padding: 40px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
h1 {
|
|
color: #202124;
|
|
margin-bottom: 8px;
|
|
font-weight: 400;
|
|
font-size: 24px;
|
|
}
|
|
|
|
p {
|
|
color: #5f6368;
|
|
margin-bottom: 32px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.demo-section {
|
|
margin-bottom: 40px;
|
|
padding: 24px;
|
|
background: #f8f9fa;
|
|
border-radius: 8px;
|
|
border: 1px solid #e8eaed;
|
|
}
|
|
|
|
.demo-section h2 {
|
|
color: #202124;
|
|
margin-bottom: 16px;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.color-pickers {
|
|
display: flex;
|
|
gap: 24px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.color-display {
|
|
margin-top: 16px;
|
|
padding: 12px;
|
|
background: white;
|
|
border-radius: 6px;
|
|
font-family: 'Roboto Mono', 'Courier New', monospace;
|
|
font-size: 13px;
|
|
border: 1px solid #e8eaed;
|
|
}
|
|
|
|
.color-display strong {
|
|
color: #4285f4;
|
|
}
|
|
|
|
.comparison {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 24px;
|
|
margin-top: 24px;
|
|
}
|
|
|
|
.comparison-item {
|
|
padding: 16px;
|
|
background: white;
|
|
border-radius: 6px;
|
|
border: 1px solid #e8eaed;
|
|
}
|
|
|
|
.comparison-item h3 {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: #202124;
|
|
margin-bottom: 12px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Chromium-style Color Picker</h1>
|
|
<p>Color picker that matches the native Chromium browser color picker design</p>
|
|
|
|
<div class="demo-section">
|
|
<h2>Single Color Picker</h2>
|
|
<div class="color-pickers">
|
|
<div id="picker1"></div>
|
|
</div>
|
|
<div class="color-display">
|
|
Selected color: <strong id="color1-display">#FF0000</strong>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="demo-section">
|
|
<h2>Multiple Color Pickers</h2>
|
|
<p style="margin-bottom: 16px; color: #5f6368; font-size: 14px;">Example: Multiple colors for LED patterns</p>
|
|
<div class="color-pickers">
|
|
<div id="picker2"></div>
|
|
<div id="picker3"></div>
|
|
<div id="picker4"></div>
|
|
</div>
|
|
<div class="color-display">
|
|
Colors: <strong id="colors-display">#FF0000, #00FF00, #0000FF</strong>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="demo-section">
|
|
<h2>Features</h2>
|
|
<ul style="color: #5f6368; line-height: 1.8; font-size: 14px;">
|
|
<li>✅ Matches native Chromium browser color picker design</li>
|
|
<li>✅ Clean, minimal interface with native system fonts</li>
|
|
<li>✅ RGB number inputs (no sliders) - Chromium style</li>
|
|
<li>✅ Hex input with uppercase formatting</li>
|
|
<li>✅ HSB (Hue, Saturation, Brightness) color model</li>
|
|
<li>✅ Touch support for mobile devices</li>
|
|
<li>✅ Keyboard accessible</li>
|
|
<li>✅ Dark mode support</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="demo-section">
|
|
<h2>Design Notes</h2>
|
|
<div class="comparison">
|
|
<div class="comparison-item">
|
|
<h3>Chromium Style</h3>
|
|
<ul style="color: #5f6368; line-height: 1.8; font-size: 13px; list-style: none; padding-left: 0;">
|
|
<li>• RGB number inputs only</li>
|
|
<li>• Compact preview button</li>
|
|
<li>• Native system fonts</li>
|
|
<li>• Minimal borders and shadows</li>
|
|
<li>• Chromium color scheme</li>
|
|
</ul>
|
|
</div>
|
|
<div class="comparison-item">
|
|
<h3>Standard Style</h3>
|
|
<ul style="color: #5f6368; line-height: 1.8; font-size: 13px; list-style: none; padding-left: 0;">
|
|
<li>• RGB sliders + inputs</li>
|
|
<li>• Larger preview button</li>
|
|
<li>• Custom styling</li>
|
|
<li>• Enhanced shadows</li>
|
|
<li>• Custom color scheme</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="color-picker-chromium.js"></script>
|
|
<script>
|
|
// Initialize Chromium-style color pickers
|
|
const picker1 = new ColorPickerChromium('#picker1', {
|
|
initialColor: '#FF0000',
|
|
onColorChange: (color) => {
|
|
document.getElementById('color1-display').textContent = color;
|
|
}
|
|
});
|
|
|
|
const picker2 = new ColorPickerChromium('#picker2', {
|
|
initialColor: '#FF0000',
|
|
onColorChange: updateColors
|
|
});
|
|
|
|
const picker3 = new ColorPickerChromium('#picker3', {
|
|
initialColor: '#00FF00',
|
|
onColorChange: updateColors
|
|
});
|
|
|
|
const picker4 = new ColorPickerChromium('#picker4', {
|
|
initialColor: '#0000FF',
|
|
onColorChange: updateColors
|
|
});
|
|
|
|
function updateColors() {
|
|
const colors = [
|
|
picker2.getColor(),
|
|
picker3.getColor(),
|
|
picker4.getColor()
|
|
];
|
|
document.getElementById('colors-display').textContent = colors.join(', ');
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|