Skip to content

Commit 00f338b

Browse files
author
igyfhc
committed
nes color
1 parent 21479e4 commit 00f338b

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed

.apps/tools/src/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const router = createRouter({
99
{ path: '/', component: () => import('./views/Home.vue') },
1010
{ path: '/calc', component: () => import('./views/Calc.vue') },
1111
{ path: '/file-byte', component: () => import('./views/FileByte.vue') },
12+
{ path: '/nes-color', component: () => import('./views/NesColor.vue') },
1213
],
1314
});
1415

.apps/tools/src/views/Home.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<li><a href="/">域根</a></li>
44
<li><RouterLink to="/calc">计算器</RouterLink></li>
55
<li><RouterLink to="/file-byte">文件字节 File Byte</RouterLink></li>
6+
<li><RouterLink to="/nes-color">Nes Color</RouterLink></li>
67
</ol>
78
</template>

.apps/tools/src/views/NesColor.vue

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<template>
2+
<div class="wrap" v-for="color in colors">
3+
<div>{{ color.note }}</div>
4+
<div class="colors">
5+
<div class="color-item" v-for="m in color.c" :style="'--color:' + m"></div>
6+
</div>
7+
</div>
8+
</template>
9+
10+
<script setup>
11+
const colors = [
12+
{
13+
note: '简书教程 tsnes',
14+
c: [
15+
'#808080', '#bb0000', '#bf0037', '#a60084',
16+
'#6a00bb', '#1e00b7', '#0000b3', '#002691',
17+
'#002b7b', '#003e00', '#0d4800', '#223c00',
18+
'#662f00', '#000000', '#000000', '#000000',
19+
20+
'#c8c8c8', '#ff5900', '#ff3c44', '#cc33b7',
21+
'#aa33ff', '#5e37ff', '#1a37ff', '#004bd5',
22+
'#0062c4', '#007b3c', '#15841e', '#669500',
23+
'#c48400', '#111111', '#090909', '#090909',
24+
25+
'#ffffff', '#ff9500', '#ff846f', '#ff6fd5',
26+
'#cc77ff', '#996fff', '#597bff', '#5f91ff',
27+
'#33a2ff', '#00bfa6', '#6ad951', '#aed54d',
28+
'#ffd900', '#666666', '#0d0d0d', '#0d0d0d',
29+
30+
'#ffffff', '#ffbf84', '#ffbbbb', '#ffbbd0',
31+
'#eabfff', '#ccbfff', '#b7c4ff', '#aeccff',
32+
'#a2d9ff', '#99e1cc', '#b7eeae', '#eef7aa',
33+
'#ffeeb3', '#dddddd', '#111111', '#111111',
34+
],
35+
},
36+
{
37+
note: 'jsnes',
38+
c: [
39+
'#525252', '#B40000', '#A00000', '#B1003D',
40+
'#740069', '#00005B', '#00005F', '#001840',
41+
'#002F10', '#084A08', '#006700', '#124200',
42+
'#6D2800', '#000000', '#000000', '#000000',
43+
'#C4D5E7', '#FF4000', '#DC0E22', '#FF476B',
44+
'#D7009F', '#680AD7', '#0019BC', '#0054B1',
45+
'#006A5B', '#008C03', '#00AB00', '#2C8800',
46+
'#A47200', '#000000', '#000000', '#000000',
47+
'#F8F8F8', '#FFAB3C', '#FF7981', '#FF5BC5',
48+
'#FF48F2', '#DF49FF', '#476DFF', '#00B4F7',
49+
'#00E0FF', '#00E375', '#03F42B', '#78B82E',
50+
'#E5E218', '#787878', '#000000', '#000000',
51+
'#FFFFFF', '#FFF2BE', '#F8B8B8', '#F8B8D8',
52+
'#FFB6FF', '#FFC3FF', '#C7D1FF', '#9ADAFF',
53+
'#88EDF8', '#83FFDD', '#B8F8B8', '#F5F8AC',
54+
'#FFFFB0', '#F8D8F8', '#000000', '#000000',
55+
],
56+
},
57+
];
58+
</script>
59+
60+
<style>
61+
.wrap {
62+
display: flex;
63+
flex-direction: column;
64+
align-items: center;
65+
}
66+
.colors {
67+
display: flex;
68+
flex-wrap: wrap;
69+
--item-width: 50px;
70+
width: calc(var(--item-width) * 16);
71+
margin: 0 auto;
72+
}
73+
.color-item {
74+
width: var(--item-width);
75+
height: var(--item-width);
76+
background-color: var(--color);
77+
}
78+
</style>

0 commit comments

Comments
 (0)