Serfoss: Horita: im using it within an each loop
Tynan: Pikul: Like, say, in my example I linked before http://jsfiddle.net/72wqm40a/3/ , it doesn’t register with the $”#test”.clickfunction { . };
Raisin: Lovely, Germany suspends schengen. anyone else does it, and Germany threatens them
Tarzia: 1,2,3.findfunctionitem { return item === 2; };
Mate: Gillice: TypeError: 1, 2, 3.find is not a function
Dostie: Malphurs, it’s working here. I clicked on Blah and got “Yay”
Lohse: I don’t remember the prefix
Eady: Horita: okay test undefined
Twiggs: B 1,2,3.findfunctionitem { return item === 2; };
Eady: Horita: error /usr/lib/node_modules/babel/node_modules/babel-core/lib/babel/transformation/fil . https://git.io/vZiP8
Railsback: Pikul: Yeah, I know in that example that it works. But I have something else where it doesn’t. I can’t put the code up
Eady: Horita: error /usr/lib/node_modules/babel/node_modules/babel-core/lib/babel/transformation/fil . https://git.io/vZiPu
Kerwood: Well #test must not exist there
Eady: Horita: okay Function
Ruhling: I don’t know how to recreate it :-/
Kotzen: I have a integer variable, i’d like to generate a greyscale HTML hex code value. how?
Seidl: Between what and what? like 0 and 255?
Kotzen: Nevermind. i think i can probably use rgbar,g,b directly.
Eppley: Color hex code should be 255 * 255 * 255 i think
Elvis: Zap0: val 16val 8val
Elvis: You want it for a 2d context?
Hollingshed: If you’re using rgb you can just use the value itself
Kotzen: Yeah. for a 2D context.
Sester: Avoiding the extended family but too hungry to continue doing so, bbiab
Daron: If you know the maximum value of the integer you can just calculate it
Elvis: Sometimes you see people do it as val * 0x010101
Elvis: Which is the same as val 16 val 8 val but way less clear imo
Kotzen: Things just went very crazy. i’m clearly failing at using rgba :
Elvis: For rgba, the rgb are between 0 and 255, and the a is between 0 and 1
Kotzen: Ctx.strokeStyle = rgba c, c, c, 1 ; i’ve converted c into 0-255
Ribas: And c indeed is 0-255?
Elvis: It needs to be a string
Buonassisi: Yeah, the whole thing
Kotzen: Ah. it’s a string, not a function.
Elvis: That is the downfall of canvas2d
Elvis: All the stupid ****ing strings
Sylvain: What would you prefer?
Boken: Rgba, r, g, b, with each being a number from 0-255?
Boken: The convention, basically
Elvis: Well, rgba vs argb vs abgr vs whatever doesnt make a huge difference to me
Boken: Strings are dumb though.
Elvis: But i would prefer actual types, yeah.
Kotzen: Ok, works now. thank you everyone.
Boken: Well considering that JS is loosely typed. yeah, it’s not that crazy to use strings
Kotzen: And now the result is not very visually appealing : . i think i need to use colour temperature or somefink instead
Higginbotham: Hi I do this in console
Elvis: Zap0: what are you going for
Burbano: Https://jsfiddle.net/f557bLq4/
Flath: Why can’t I erase the background color property?
Kotzen: Trying to map a var from 0 to ~10 into a visual colour that ***uely represents that values intensity. i have a greyscale. but it just doesn’t convey good visual cues.
Kotzen: I might try finding a few colours i can put into a scale, that represents cold- to hot.
Elvis: Try using hsl and changing saturation, or something like that.