Hi, so i was messing around with the fade color extension, and because its so usefull for handling colors and doing color math, i thought it would be a good idea to use this to my advantage to automatically create a “water” pallette:
let waterPalettes: color.RGB[] = []
let ogPalettes: number[][] = [
[0, 0, 0],
[255, 255, 255],
[255, 33, 33],
[255, 147, 196],
[255, 129, 53],
[255, 246, 9],
[36, 156, 163],
[20, 220, 82],
[0, 63, 173],
[35, 242, 255],
[142, 46, 196],
[164, 131, 159],
[92, 64, 108],
[229, 205, 196],
[145, 70, 61],
[0, 0, 0],
]
for (let i = 0; i < 16; i++) {
waterPalettes[i] = color.rgb(ogPalettes[i][0], ogPalettes[i][1], ogPalettes[i][2])
//waterPalletes[i] = color.rgb(1,1,1)
}
let waterPalette = color.rgbArrayToPalette(waterPalettes)
But for some reason, i have this error, that just wont go. I dont know why. Its a simple error so i thought somebody may know why this happens:
Line 22: Type ‘number’ is not assignable to type ‘RGB’.
Ive tried looking into the extensions source code, several times, changing things around a bit, but it still happens everytime.
I hope you can help me.