Interpolate also alpha channel

This commit is contained in:
Guntis Smaukstelis
2025-06-05 22:27:43 +03:00
parent 011ea8fb08
commit 87971906cf
3 changed files with 8 additions and 9 deletions
+3 -2
View File
@@ -221,15 +221,16 @@ function drawContour(
}
function rgbHexToU8(hex: string): RGBu8 {
function rgbHexToU8(hex: string): RGBAu8 {
return [
parseInt(`0x${hex.slice(1, 3)}`),
parseInt(`0x${hex.slice(3, 5)}`),
parseInt(`0x${hex.slice(5, 7)}`),
255,
]
}
type RGBu8 = [number, number, number]
type RGBAu8 = [number, number, number, number]
export function isMeteoEqual(meteo: MeteoParam, arr: number[]): boolean {
const arr2 = [meteo.discipline, meteo.category, meteo.product]