Skip to content

Commit af33642

Browse files
committed
fix(resistor): band colors+width #74
close #74
1 parent 830e75d commit af33642

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/resistor-element.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { customElement, html, LitElement, property } from 'lit-element';
22
import { ElementPin } from './pin';
33

44
const bandColors: { [key: number]: string } = {
5-
[-2]: 'silver',
6-
[-1]: '#c4a000', // gold
7-
0: 'black',
8-
1: '#8b4513',
9-
2: 'red',
10-
3: 'orange',
11-
4: 'yellow',
12-
5: 'green',
13-
6: 'blue',
14-
7: 'violet',
15-
8: 'gray',
16-
9: 'white',
5+
[-2]: '#C3C7C0', // Silver
6+
[-1]: '#F1D863', // Gold
7+
0: '#000000', // Black
8+
1: '#8F4814', // Brown
9+
2: '#FB0000', // Red
10+
3: '#FC9700', // Orange
11+
4: '#FCF800', // Yellow
12+
5: '#00B800', // Green
13+
6: '#0000FF', // Blue
14+
7: '#A803D6', // Violet
15+
8: '#808080', // Gray
16+
9: '#FCFCFC', // White
1717
};
1818

1919
/**
@@ -112,8 +112,8 @@ export class ResistorElement extends LitElement {
112112
d="m4.6917 0c-0.10922 0-0.21558 0.00884-0.31985 0.022624v2.955c0.10426 0.013705 0.21063 0.02234 0.31985 0.02234 0.15603 0 0.3074-0.015363 0.4522-0.043551v-2.9129c-0.1448-0.028193-0.29617-0.043551-0.4522-0.043552z"
113113
fill="${band1Color}"
114114
/>
115-
<path d="m6.4482 0.29411v2.4117h0.77205v-2.4117z" fill="${band2Color}" />
116-
<path d="m8.5245 0.29411v2.4117h0.77205v-2.4117z" fill="${band3Color}" />
115+
<path d="m6.3482 0.29411v2.4117h0.96v-2.4117z" fill="${band2Color}" />
116+
<path d="m8.4245 0.29411v2.4117h0.96v-2.4117z" fill="${band3Color}" />
117117
<path
118118
d="m11.054 0c-0.15608 0-0.30749 0.015253-0.45277 0.043268v2.9134c0.14527 0.028012 0.29669 0.043268 0.45277 0.043268 0.10912 0 0.21539-0.00867 0.31957-0.02234v-2.955c-0.10418-0.013767-0.21044-0.022624-0.31957-0.022624z"
119119
fill="#c4a000"

0 commit comments

Comments
 (0)