Skip to content

Commit b70b7c9

Browse files
committed
Update CHANGELOG
1 parent 7b1b0e8 commit b70b7c9

5 files changed

Lines changed: 24 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
### Pending Fixed
1414

15+
### v14.23.1 - 2025-02-13
16+
17+
- :bug: Fix color issue surfaced by KML Parsing fixes in 14.23
18+
1519
### v14.23.0 - 2025-02-13
1620

1721
- :bug: Fix transparency parsing and writing of KML Alpha values

lib/parser/to_geojson.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ export async function to_geojson(cot: CoT): Promise<Static<typeof Feature>> {
380380
if (rawColor.startsWith('#')) rawColor = rawColor.substring(1);
381381

382382
const a = parseInt(rawColor.substring(0, 2), 16);
383-
const b = parseInt(rawColor.substring(2, 4), 16);
383+
const r = parseInt(rawColor.substring(2, 4), 16);
384384
const g = parseInt(rawColor.substring(4, 6), 16);
385-
const r = parseInt(rawColor.substring(6, 8), 16);
385+
const b = parseInt(rawColor.substring(6, 8), 16);
386386

387387
const strokeColor = new Color([a, r, g, b]);
388388
feat.properties.stroke = strokeColor.as_hex();
@@ -399,9 +399,9 @@ export async function to_geojson(cot: CoT): Promise<Static<typeof Feature>> {
399399
if (rawColor.startsWith('#')) rawColor = rawColor.substring(1);
400400

401401
const a = parseInt(rawColor.substring(0, 2), 16);
402-
const b = parseInt(rawColor.substring(2, 4), 16);
402+
const r = parseInt(rawColor.substring(2, 4), 16);
403403
const g = parseInt(rawColor.substring(4, 6), 16);
404-
const r = parseInt(rawColor.substring(6, 8), 16);
404+
const b = parseInt(rawColor.substring(6, 8), 16);
405405

406406
const fillColor = new Color([a, r, g, b]);
407407
feat.properties['fill-opacity'] = fillColor.as_opacity() / 255;

lib/utils/color.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default class Color {
5858
const g = Math.round(this.g).toString(16).padStart(2, '0');
5959
const r = Math.round(this.r).toString(16).padStart(2, '0');
6060

61-
return `${a}${b}${g}${r}`.toUpperCase();
61+
return `${a}${r}${g}${b}`.toUpperCase();
6262
}
6363

6464
as_32bit(): number {

test/cot-shapes.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,14 @@ test.only('Basic Circle', async (t) => {
162162
labels: true,
163163
archived: true,
164164
precisionlocation: { altsrc: 'DTED0' },
165-
stroke: '#0077FF',
165+
stroke: '#FF7700',
166166
'stroke-opacity': 1,
167167
'stroke-width': 3,
168168
'stroke-style': 'solid',
169169
'marker-color': '#FF7700',
170170
'marker-opacity': 1,
171171
'fill-opacity': 0,
172-
fill: '#0077FF',
172+
fill: '#FF7700',
173173
shape: { ellipse: { major: 185753.64687066682, minor: 185753.64687066682, angle: 360 } },
174174
metadata: {}
175175
},
@@ -264,7 +264,7 @@ test.only('Basic Circle', async (t) => {
264264
archive: { _attributes: {} },
265265
creator: { _attributes: { uid: 'ANDROID-764679f74013dfe2', callsign: 'COTAK Admin Ingalls', time: '2025-07-09T22:12:06.038Z', type: 'a-f-G-E-V-C' } },
266266
precisionlocation: { _attributes: { altsrc: 'DTED0' } },
267-
strokeColor: { "_attributes": { "value": -16746497 } },
267+
strokeColor: { "_attributes": { "value": -35072 } },
268268
strokeWeight: { "_attributes": { "value": 3 } },
269269
labels_on: { "_attributes": { "value": true } },
270270
tog: { "_attributes": { "enabled": "0" } },

test/cot-user-draw.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ test('Parse u-d-c-c (Circle - Transparent)', async (t) => {
8585
precisionlocation: {
8686
altsrc: 'DTED2'
8787
},
88-
stroke: '#0077FF',
89-
'stroke-opacity': 1,
90-
'stroke-width': 3,
91-
'stroke-style': 'solid',
92-
'fill-opacity': 0,
93-
fill: '#0077FF',
88+
stroke: '#FF7700',
89+
'stroke-opacity': 1,
90+
'stroke-width': 3,
91+
'stroke-style': 'solid',
92+
'fill-opacity': 0,
93+
fill: '#FF7700',
9494
shape: {
9595
ellipse: {
9696
major: 2535.9708862816324,
@@ -263,12 +263,12 @@ test('Parse u-d-c-c (Circle - Filled)', async (t) => {
263263
precisionlocation: {
264264
altsrc: 'DTED2'
265265
},
266-
stroke: '#0077FF',
267-
'stroke-opacity': 1,
268-
'stroke-width': 3,
269-
'stroke-style': 'solid',
270-
'fill-opacity': 1,
271-
fill: '#0077FF',
266+
stroke: '#FF7700',
267+
'stroke-opacity': 1,
268+
'stroke-width': 3,
269+
'stroke-style': 'solid',
270+
'fill-opacity': 1,
271+
fill: '#FF7700',
272272
shape: {
273273
ellipse: {
274274
major: 2908.096601511143,

0 commit comments

Comments
 (0)