1'use strict'; 2 3function LightenDarkenColor(col, amt) { 4 5 var usePound = false; 6 7 if (col[0] === '#') { 8 col = col.slice(1); 9 usePound = true; 10 } 11 12 var num = parseInt(col,16); 13 14 var r = (num >> 16) + amt; 15 16 if (r > 255) r = 255; 17 else if (r < 0) r = 0; 18 19 var b = ((num >> 8) & 0x00FF) + amt; 20 21 if (b > 255) { 22 b = 255; 23 } 24 else if (b < 0) { 25 b = 0; 26 } 27 28 var g = (num & 0x0000FF) + amt; 29 30 if (g > 255) { 31 g = 255; 32 } 33 else if (g < 0) { 34 g = 0; 35 } 36 37 return (usePound?'#':'') + (g | (b << 8) | (r << 16)).toString(16); 38 39}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.