diff --git a/src/blocks.ts b/src/blocks.ts index d2889ef..45a4c03 100644 --- a/src/blocks.ts +++ b/src/blocks.ts @@ -1330,7 +1330,7 @@ export const sensing_touchingcolor = new ProtoBlock({ colorCategory: 'sensing', }); -const __color2 = new Uint8ClampedArray(3); +const __color2 = new Uint8ClampedArray(4); export const sensing_coloristouchingcolor = new ProtoBlock({ opcode: 'sensing_coloristouchingcolor', inputs: { diff --git a/src/cast.ts b/src/cast.ts index 03725a4..1dd19a8 100644 --- a/src/cast.ts +++ b/src/cast.ts @@ -74,7 +74,7 @@ export const toListIndex = (value: string | number | boolean | void, length: num */ export const toColor = ( value: string | number | boolean | void, - dst = new Uint8ClampedArray(4), + dst: Uint8ClampedArray = new Uint8ClampedArray(4), ): Uint8ClampedArray => { let color; if (typeof value === 'string' && value[0] === '#') {