Showing 2 of 8 total issues
Function click
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function click(e) {
const ctx = $('#color-canvas')[0].getContext('2d')
ctx.clearRect(0, 0, 400, 100)
const lightGrd = createGrd(85)
Function changeColor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function changeColor(e) {
e && (x = e.offsetX)
const id = ctx.getImageData(x, 0, 1, 1).data
let h = Math.max(id[0], id[1], id[2]) - Math.min(id[0], id[1], id[2])
if (h > 0) {