initial cleanup

This commit is contained in:
terraputix
2026-01-07 23:45:10 +01:00
parent 2d31df88f0
commit f781ef4fd6
325 changed files with 1903 additions and 1000 deletions
+5 -5
View File
@@ -13,9 +13,9 @@ export function rgbToHex(rgb: string) {
b,
hex = '';
if ((result = rgbRegex.exec(rgb))) {
r = componentFromStr(result[1], result[2]);
g = componentFromStr(result[3], result[4]);
b = componentFromStr(result[5], result[6]);
r = componentFromStr(result[1], Number(result[2]));
g = componentFromStr(result[3], Number(result[4]));
b = componentFromStr(result[5], Number(result[6]));
hex = (0x1000000 + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
@@ -25,9 +25,9 @@ export function rgbToHex(rgb: string) {
return hex;
}
export const getColor = (temp: number, unit = 'celsius'): string => {
export const getColor = (tempString: string, unit = 'celsius'): string => {
let index = 0;
temp = Number(temp);
const temp = Number(tempString);
if (unit === 'celsius') {
if (temp <= -40) {
index = 0;