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

View File

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

View File

@@ -3,7 +3,7 @@ page {
height: 100vh;
display: flex;
flex-direction: column;
background-color: #f5f6fa;
background-color: #EBF4F8; /* Color 03 */
}
.scrollarea {
flex: 1;
@@ -19,14 +19,14 @@ page {
.header-bg {
width: 100%;
height: 380rpx;
background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
background: #11616B; /* Color 01 - Solid Color */
border-bottom-left-radius: 48rpx;
border-bottom-right-radius: 48rpx;
padding: 40rpx;
box-sizing: border-box;
display: flex;
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;
overflow: hidden;
}
@@ -122,12 +122,12 @@ page {
padding: 32rpx;
display: flex;
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 {
transform: scale(0.97);
background-color: #f8f7ff;
background-color: #EBF4F8; /* Color 03 hover */
}
.icon-box {
@@ -143,22 +143,23 @@ page {
.icon {
font-size: 46rpx;
color: #11616B; /* Icon color dark teal */
}
.bg-gradient-blue {
background: linear-gradient(135deg, #e0e6ff 0%, #c7d2fe 100%);
background: #EBF4F8; /* Color 03 */
}
.bg-gradient-pink {
background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
background: #FED9CD; /* Color 04 */
}
.bg-gradient-green {
background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
background: #7BBDB6; /* Color 02 */
}
.bg-gradient-orange {
background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
background: #FED9CD; /* Color 04 */
}
.bg-gradient-purple {
background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
background: #DC8B70; /* Color 05 */
}
.text-box {