22< html lang ="zh-CN ">
33< head >
44 < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
56 < title > 颜色选择器与转换器</ title >
67 < link rel ="stylesheet " href ="../css/style.css ">
78 < style >
1617 .color-input-group {
1718 display : flex;
1819 gap : 10px ;
19- margin-bottom : 15 px ;
20+ margin-bottom : 12 px ;
2021 align-items : center;
2122 }
22- .color-input-group label {
23- min-width : 80px ;
24- font-weight : 500 ;
23+ .color-input-group .color-format-label {
24+ min-width : 50px ;
25+ font-weight : 600 ;
26+ font-size : 0.9em ;
27+ font-family : 'Inter' , sans-serif;
28+ color : var (--text-primary );
29+ letter-spacing : 0.2px ;
30+ margin-bottom : 0 ;
2531 }
2632 .copy-icon {
2733 cursor : pointer;
2834 width : 28px ;
2935 height : 28px ;
30- fill : # 3B82F6 ;
36+ fill : var ( --primary ) ;
3137 padding : 6px ;
32- background : rgba (255 , 255 , 255 , 0.9 );
33- border-radius : 8px ;
34- transition : all 150ms ease;
35- box-shadow : 0 2px 8px rgba (0 , 0 , 0 , 0.1 );
38+ background : var (--surface );
39+ border : 1px solid var (--border );
40+ border-radius : var (--border-radius-sm );
41+ transition : all var (--transition-fast );
42+ box-shadow : 0 1px 2px var (--shadow-color );
43+ box-sizing : border-box;
44+ flex-shrink : 0 ;
3645 }
3746 .copy-icon : hover {
38- fill : # 2563EB ;
47+ fill : var ( --primary-dark ) ;
3948 transform : scale (1.1 );
40- box-shadow : 0 4 px 12 px rgba (59 , 130 , 246 , 0.3 );
49+ box-shadow : 0 2 px 6 px rgba (59 , 130 , 246 , 0.3 );
4150 }
4251 # color-picker {
4352 width : 100% ;
@@ -64,23 +73,23 @@ <h1>颜色选择器与转换器</h1>
6473 < div class ="color-preview " id ="color-preview "> </ div >
6574
6675 < div class ="color-input-group ">
67- < label > HEX:</ label >
76+ < label class =" color-format-label " > HEX:</ label >
6877 < input type ="text " id ="hex-input " class ="tool-input " placeholder ="#000000 ">
6978 < svg class ="copy-icon " onclick ="copyToClipboard('hex-input') " viewBox ="0 0 24 24 ">
7079 < path d ="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z "/>
7180 </ svg >
7281 </ div >
7382
7483 < div class ="color-input-group ">
75- < label > RGB:</ label >
84+ < label class =" color-format-label " > RGB:</ label >
7685 < input type ="text " id ="rgb-input " class ="tool-input " placeholder ="rgb(0, 0, 0) ">
7786 < svg class ="copy-icon " onclick ="copyToClipboard('rgb-input') " viewBox ="0 0 24 24 ">
7887 < path d ="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z "/>
7988 </ svg >
8089 </ div >
8190
8291 < div class ="color-input-group ">
83- < label > HSL:</ label >
92+ < label class =" color-format-label " > HSL:</ label >
8493 < input type ="text " id ="hsl-input " class ="tool-input " placeholder ="hsl(0, 0%, 0%) ">
8594 < svg class ="copy-icon " onclick ="copyToClipboard('hsl-input') " viewBox ="0 0 24 24 ">
8695 < path d ="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z "/>
0 commit comments