Apply Morandi 2024 Color Scheme to Calculator page

This commit is contained in:
2026-02-07 21:09:39 +08:00
parent 19c762b3fa
commit 17e32d7cc1
3 changed files with 74 additions and 69 deletions

View File

@@ -3,7 +3,7 @@
/* ========== 全局 ========== */ /* ========== 全局 ========== */
page { page {
height: 100%; height: 100%;
background-color: #1c1c1e; background-color: #EBF4F8; /* Color 03 (Background) */
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
@@ -24,7 +24,7 @@ page {
justify-content: flex-end; justify-content: flex-end;
align-items: flex-end; align-items: flex-end;
padding: 30rpx 40rpx 20rpx; padding: 30rpx 40rpx 20rpx;
background: linear-gradient(180deg, #1c1c1e 0%, #2c2c2e 100%); background: transparent; /* No more dark gradient */
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
@@ -52,32 +52,34 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 50%; border-radius: 50%;
background: rgba(255,255,255,0.08); background: rgba(17, 97, 107, 0.1); /* Color 01 with opacity */
} }
.action-icon { .action-icon {
font-size: 30rpx; font-size: 30rpx;
color: #11616B; /* Color 01 */
} }
/* 模式切换 */ /* 模式切换 */
.mode-indicator text { .mode-indicator text {
color: rgba(255,255,255,0.4); color: #7BBDB6; /* Color 02 text */
font-size: 24rpx; font-size: 24rpx;
padding: 10rpx 24rpx; padding: 10rpx 24rpx;
border-radius: 30rpx; border-radius: 30rpx;
background: rgba(255,255,255,0.06); background: rgba(123, 189, 182, 0.2); /* Color 02 bg */
border: none; border: none;
} }
.mode-indicator text.active { .mode-indicator text.active {
color: #ff9f0a; color: #11616B; /* Color 01 text */
background: rgba(255, 159, 10, 0.15); background: rgba(17, 97, 107, 0.15); /* Color 01 bg */
font-weight: 600;
} }
/* 表达式行 */ /* 表达式行 */
.history-text { .history-text {
font-size: 32rpx; font-size: 32rpx;
color: rgba(255,255,255,0.35); color: rgba(17, 97, 107, 0.6); /* Color 01 faded */
min-height: 44rpx; min-height: 44rpx;
margin-bottom: 12rpx; margin-bottom: 12rpx;
font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif; font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
@@ -89,7 +91,7 @@ page {
/* 当前值 */ /* 当前值 */
.current-value { .current-value {
font-size: 130rpx; font-size: 130rpx;
color: #ffffff; color: #11616B; /* Color 01 (Deep Teal) */
line-height: 1.1; line-height: 1.1;
font-weight: 200; font-weight: 200;
word-break: break-all; word-break: break-all;
@@ -108,7 +110,7 @@ page {
/* ========== 键盘区域 ========== */ /* ========== 键盘区域 ========== */
.keypad-area { .keypad-area {
background: #1c1c1e; background: #EBF4F8; /* Color 03 */
padding: 16rpx 24rpx 24rpx; padding: 16rpx 24rpx 24rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -149,17 +151,18 @@ page {
font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif; font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
box-shadow: 0 4rpx 10rpx rgba(17, 97, 107, 0.05); /* Very subtle shadow */
} }
/* 数字键 */ /* 数字键 */
.digit { .digit {
background-color: #3a3a3c; background-color: #ffffff;
color: #ffffff; color: #11616B; /* Color 01 */
} }
/* 功能键 */ /* 功能键 (AC, +/-, %) */
.func { .func {
background-color: #636366; background-color: #7BBDB6; /* Color 02 (Medium Teal) */
color: #ffffff; color: #ffffff;
font-size: 46rpx; font-size: 46rpx;
font-weight: 500; font-weight: 500;
@@ -167,16 +170,17 @@ page {
/* 运算符 */ /* 运算符 */
.operator { .operator {
background-color: #ff9f0a; background-color: #FED9CD; /* Color 04 (Pale Pink/Peach) */
color: #ffffff; color: #DC8B70; /* Color 05 (Terracotta) for contrast */
font-size: 64rpx; font-size: 64rpx;
font-weight: 400; font-weight: 400;
} }
/* 等号键:渐变突出 */ /* 等号键:渐变突出 */
.equal { .equal {
background: linear-gradient(135deg, #ff9f0a 0%, #ff6723 100%); background: #11616B; /* Color 01 (Deep Teal) */
box-shadow: 0 6rpx 20rpx rgba(255, 159, 10, 0.35); color: #ffffff;
box-shadow: 0 6rpx 20rpx rgba(17, 97, 107, 0.3);
} }
/* 0键 */ /* 0键 */
@@ -191,7 +195,7 @@ page {
/* 点击反馈 */ /* 点击反馈 */
.btn-hover { .btn-hover {
transform: scale(0.92); transform: scale(0.92);
opacity: 0.75; opacity: 0.9;
} }
/* 科学模式缩放 */ /* 科学模式缩放 */
@@ -219,8 +223,8 @@ page {
width: 120rpx !important; width: 120rpx !important;
height: 120rpx !important; height: 120rpx !important;
font-size: 32rpx !important; font-size: 32rpx !important;
background: rgba(255,255,255,0.08) !important; background: rgba(17, 97, 107, 0.05) !important; /* Very light teal bg */
color: #64d2ff !important; color: #11616B !important; /* Color 01 */
border-radius: 50% !important; border-radius: 50% !important;
font-weight: 500 !important; font-weight: 500 !important;
letter-spacing: 1rpx; letter-spacing: 1rpx;
@@ -249,18 +253,18 @@ page {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background: rgba(0,0,0,0.55); background: rgba(17, 97, 107, 0.4); /* Color 01 dim */
} }
.history-content { .history-content {
position: relative; position: relative;
z-index: 101; z-index: 101;
background: #2c2c2e; background: #EBF4F8; /* Color 03 */
border-radius: 0 0 36rpx 36rpx; border-radius: 0 0 36rpx 36rpx;
max-height: 70vh; max-height: 70vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
box-shadow: 0 16rpx 48rpx rgba(0,0,0,0.5); box-shadow: 0 16rpx 48rpx rgba(17, 97, 107, 0.2);
} }
.history-panel.show .history-content { .history-panel.show .history-content {
@@ -277,22 +281,22 @@ page {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 36rpx 40rpx; padding: 36rpx 40rpx;
border-bottom: 1rpx solid rgba(255,255,255,0.08); border-bottom: 2rpx solid rgba(17, 97, 107, 0.1);
} }
.history-title { .history-title {
color: #ffffff; color: #11616B; /* Color 01 */
font-size: 34rpx; font-size: 34rpx;
font-weight: 600; font-weight: 600;
letter-spacing: 1rpx; letter-spacing: 1rpx;
} }
.history-clear { .history-clear {
color: #ff9f0a; color: #DC8B70; /* Color 05 */
font-size: 28rpx; font-size: 28rpx;
padding: 8rpx 24rpx; padding: 8rpx 24rpx;
border-radius: 20rpx; border-radius: 20rpx;
background: rgba(255, 159, 10, 0.1); background: rgba(220, 139, 112, 0.15); /* Color 05 faint */
} }
.history-list { .history-list {
@@ -329,7 +333,7 @@ page {
.history-empty { .history-empty {
text-align: center; text-align: center;
padding: 100rpx 0; padding: 100rpx 0;
color: rgba(255,255,255,0.25); color: rgba(17, 97, 107, 0.4);
font-size: 28rpx; font-size: 28rpx;
} }
@@ -337,6 +341,7 @@ page {
font-size: 64rpx; font-size: 64rpx;
display: block; display: block;
margin-bottom: 16rpx; margin-bottom: 16rpx;
opacity: 0.5;
} }
/* ========== 小屏适配 ========== */ /* ========== 小屏适配 ========== */

View File

@@ -2,18 +2,17 @@
/* ========== 全局变量 ========== */ /* ========== 全局变量 ========== */
page { page {
background-color: #fcfbfd; /* 极淡的紫灰色背景 */ background-color: #EBF4F8; /* Color 03: Pale Blue */
color: #594f6d; /* 莫兰迪深紫灰文字 */ color: #2d3436;
/* 莫兰迪紫色系定义 */ /* Color Palette based on '2024 COLOR MATCHING' */
--primary: #9b8ea9; /* 莫兰迪紫/烟熏紫 */ --primary: #11616B; /* Color 01: Deep Teal */
--primary-light: #dcd6e4; --primary-light: #7BBDB6; /* Color 02: Medium Teal */
--primary-bg: #f4f1f7; --primary-bg: #dbecef; /* Lighter version of Color 02 for backgrounds */
--card-shadow: 0 4rpx 16rpx rgba(155, 142, 169, 0.1); --card-shadow: 0 4rpx 16rpx rgba(17, 97, 107, 0.08);
--card-radius: 24rpx; --card-radius: 24rpx;
/* 移除渐变,使用莫兰迪纯色 */ --accent-color: #11616B; /* Color 01 */
--accent-color: #9b8ea9;
} }
/* ========== 容器 ========== */ /* ========== 容器 ========== */
@@ -26,22 +25,22 @@ page {
/* ========== Tab 切换 ========== */ /* ========== Tab 切换 ========== */
.tab-header { .tab-header {
display: grid; /* 使用 Grid 均分三列,杜绝挤压 */ display: grid;
grid-template-columns: 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr;
background: #f1f2f6; background: #dfe9ed; /* Slightly darker than page bg */
padding: 8rpx; padding: 8rpx;
border-radius: 60rpx; border-radius: 60rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
align-items: center; align-items: center;
gap: 8rpx; /* 增加列间距 */ gap: 8rpx;
} }
.tab-pill { .tab-pill {
text-align: center; text-align: center;
padding: 24rpx 0; /* 增加高度 */ padding: 24rpx 0;
border-radius: 50rpx; border-radius: 50rpx;
font-size: 28rpx; font-size: 28rpx;
color: #a4b0be; /* 莫兰迪浅灰未选中态 */ color: #7f8c8d;
font-weight: 500; font-weight: 500;
white-space: nowrap; white-space: nowrap;
transition: all 0.2s ease; transition: all 0.2s ease;
@@ -50,11 +49,11 @@ page {
} }
.tab-pill.active { .tab-pill.active {
background: var(--accent-color); /* 纯色背景 */ background: #11616B; /* Color 01 */
color: #ffffff; color: #ffffff;
font-weight: 600; font-weight: 600;
box-shadow: 0 4rpx 12rpx rgba(155, 142, 169, 0.4); /* 匹配主色的柔和阴影 */ box-shadow: 0 4rpx 12rpx rgba(17, 97, 107, 0.3);
transform: none; /* 移除缩放,防止文字抖动 */ transform: none;
} }
.tab-hover { .tab-hover {
@@ -189,39 +188,39 @@ page {
} }
.tag-plus { .tag-plus {
background: #f1f2f6; /* 莫兰迪浅灰 */ background: #EBF4F8; /* Color 03 */
color: #747d8c; color: #11616B; /* Color 01 */
border-color: #dfe4ea; border-color: #7BBDB6; /* Color 02 */
} }
.tag-minus { .tag-minus {
background: #fae1dd; /* 莫兰迪淡粉红 */ background: #FED9CD; /* Color 04 */
color: #c08081; /* 莫兰迪深砖红 */ color: #DC8B70; /* Color 05 */
border-color: #fceceb; border-color: #fceceb;
} }
.tag-hover { .tag-hover {
background: #ced6e0 !important; background: #7BBDB6 !important; /* Color 02 */
color: #57606f !important; color: #ffffff !important;
border-color: #a4b0be !important; border-color: #11616B !important;
transform: scale(0.95); transform: scale(0.95);
} }
.tag-minus-hover { .tag-minus-hover {
background: #f5cdc9 !important; background: #DC8B70 !important; /* Color 05 */
color: #b37172 !important; color: #ffffff !important;
transform: scale(0.95); transform: scale(0.95);
} }
/* ========== 结果卡片(通用) ========== */ /* ========== 结果卡片(通用) ========== */
.result-card { .result-card {
background: var(--accent-color); /* 莫兰迪色纯色背景 */ background: var(--accent-color); /* Color 01 */
color: #fff; color: #fff;
text-align: center; text-align: center;
padding: 40rpx 32rpx; padding: 40rpx 32rpx;
border-radius: var(--card-radius); border-radius: var(--card-radius);
margin-bottom: 24rpx; margin-bottom: 24rpx;
box-shadow: 0 8rpx 24rpx rgba(155, 142, 169, 0.35); /* 匹配紫色的阴影 */ box-shadow: 0 8rpx 24rpx rgba(17, 97, 107, 0.25); /* Teal shadow */
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
@@ -234,7 +233,7 @@ page {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
border-radius: 50%; border-radius: 50%;
background: rgba(255,255,255,0.1); /* 稍微提高透明度 */ background: rgba(255,255,255,0.1);
} }
.result-label { .result-label {

View File

@@ -3,7 +3,7 @@ page {
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #f5f6fa; background-color: #EBF4F8; /* Color 03 */
} }
.scrollarea { .scrollarea {
flex: 1; flex: 1;
@@ -19,14 +19,14 @@ page {
.header-bg { .header-bg {
width: 100%; width: 100%;
height: 380rpx; height: 380rpx;
background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%); background: #11616B; /* Color 01 - Solid Color */
border-bottom-left-radius: 48rpx; border-bottom-left-radius: 48rpx;
border-bottom-right-radius: 48rpx; border-bottom-right-radius: 48rpx;
padding: 40rpx; padding: 40rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
justify-content: center; justify-content: center;
box-shadow: 0 12rpx 32rpx rgba(108, 92, 231, 0.25); box-shadow: 0 12rpx 32rpx rgba(17, 97, 107, 0.25);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
@@ -122,12 +122,12 @@ page {
padding: 32rpx; padding: 32rpx;
display: flex; display: flex;
align-items: center; align-items: center;
box-shadow: 0 8rpx 32rpx rgba(108, 92, 231, 0.08); box-shadow: 0 8rpx 24rpx rgba(17, 97, 107, 0.06); /* Teal shadow */
} }
.grid-item-hover { .grid-item-hover {
transform: scale(0.97); transform: scale(0.97);
background-color: #f8f7ff; background-color: #EBF4F8; /* Color 03 hover */
} }
.icon-box { .icon-box {
@@ -143,22 +143,23 @@ page {
.icon { .icon {
font-size: 46rpx; font-size: 46rpx;
color: #11616B; /* Icon color dark teal */
} }
.bg-gradient-blue { .bg-gradient-blue {
background: linear-gradient(135deg, #e0e6ff 0%, #c7d2fe 100%); background: #EBF4F8; /* Color 03 */
} }
.bg-gradient-pink { .bg-gradient-pink {
background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%); background: #FED9CD; /* Color 04 */
} }
.bg-gradient-green { .bg-gradient-green {
background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); background: #7BBDB6; /* Color 02 */
} }
.bg-gradient-orange { .bg-gradient-orange {
background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); background: #FED9CD; /* Color 04 */
} }
.bg-gradient-purple { .bg-gradient-purple {
background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%); background: #DC8B70; /* Color 05 */
} }
.text-box { .text-box {