From 52231902c940b3e2865606838f3da0e037e419c3 Mon Sep 17 00:00:00 2001 From: Angel Wang Date: Sat, 20 Jun 2026 23:19:46 -0600 Subject: [PATCH] fix: rare case where 0 0 0 is actually the closest colour --- apply/application.ts | 4 +++- deno.lock | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apply/application.ts b/apply/application.ts index c138654..6de0cdf 100644 --- a/apply/application.ts +++ b/apply/application.ts @@ -44,6 +44,8 @@ export async function getOpenMeteoData( models: weatherModel, current: "cloud_cover", minutely_15: "shortwave_radiation_instant", + forecast_minutely_15: "1", + past_minutely_15: "1" }), }, ) @@ -81,7 +83,7 @@ export function findMatchingImages( lightnessValue: number, ) { const targetColour = [hueValue, chromaValue, lightnessValue] - let closestColour = { path: "", oklch: [0, 0, 0] } + let closestColour = { path: "", oklch: [-1, -1, -1] } for (const file of imagesData.files) { if ( diff --git a/deno.lock b/deno.lock index 0ea6dee..d7a96ad 100644 --- a/deno.lock +++ b/deno.lock @@ -3,7 +3,8 @@ "specifiers": { "jsr:@std/assert@1": "1.0.19", "jsr:@std/internal@^1.0.12": "1.0.14", - "npm:suncalc@2": "2.0.0" + "npm:suncalc@2": "2.0.0", + "npm:zx@^8.8.5": "8.8.5" }, "jsr": { "@std/assert@1.0.19": { @@ -19,6 +20,10 @@ "npm": { "suncalc@2.0.0": { "integrity": "sha512-RcO28GOMXNnB+sr+c7/+zv5UPMa9wxIsUVGE3HddjQykqCVEC2rc4t4IjBB7qaa7K7dx5Cxp8UZwexyXrX8JkA==" + }, + "zx@8.8.5": { + "integrity": "sha512-SNgDF5L0gfN7FwVOdEFguY3orU5AkfFZm9B5YSHog/UDHv+lvmd82ZAsOenOkQixigwH2+yyH198AwNdKhj+RA==", + "bin": true } }, "workspace": { @@ -27,7 +32,8 @@ ], "packageJson": { "dependencies": [ - "npm:suncalc@2" + "npm:suncalc@2", + "npm:zx@^8.8.5" ] } } -- 2.51.2