Just a question why are you calculating the rgb with decimal accuracy? 8 bit images only have a precision of 255 per channel. one major usability function i would suggest is to start the picking on the down click, but keep it as a bool that isn't reset until the user unclicks regardless of if the players mouse is over the top of the picker or not. It is super annoying to have the thing stop because it's hard to keep the mouse on the ring exactly.
Also, why does the value and saturation change when you click on the hue ring? that should be locked and not change until you set that manually.
Issues
- missing terms of use (I recommend zlib/libpng license or cc0/public domain)
- using outer ring returns floating point numbers at times (I math.floor'ed them in the demo).
- it seems impossible to pick full saturation/black/white because the triangle touches the circle.
- scaled up, the circle is split (which looks cool though)
I made a prettier demo. My changes are cc0/public domain (no need to mention) but consider the font license info - it seems cc0/public domain like but I recommend including the text file.
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
I was wondering if I could use either of your color pickers in a project of mine? I don't know exactly what this project is yet, but I can see it being very useful. All credit will be given.
Just a question why are you calculating the rgb with decimal accuracy? 8 bit images only have a precision of 255 per channel. one major usability function i would suggest is to start the picking on the down click, but keep it as a bool that isn't reset until the user unclicks regardless of if the players mouse is over the top of the picker or not. It is super annoying to have the thing stop because it's hard to keep the mouse on the ring exactly.
Also, why does the value and saturation change when you click on the hue ring? that should be locked and not change until you set that manually.
thanks man, because results of the convertion from HSV to RGB is not in integer, i passed it directely. i'ill math.floor() the returns.
for the position in the triangle....ok, i ll set it to the same relative position.
qubodup wrote:Very nice! I hope some games will use it.
Issues
- missing terms of use (I recommend zlib/libpng license or cc0/public domain)
- using outer ring returns floating point numbers at times (I math.floor'ed them in the demo).
- it seems impossible to pick full saturation/black/white because the triangle touches the circle.
- scaled up, the circle is split (which looks cool though)
I made a prettier demo. My changes are cc0/public domain (no need to mention) but consider the font license info - it seems cc0/public domain like but I recommend including the text file.
i like your demo, mine is just for showing it's simple to use.
you like the ring with lines or just a whole ring? you can edit the setLineWidth(3) to setLineWidth(self.size/100)
i forgot to translate the license to english that i wrote in chinese. free to use and no need to mention but dont claim it as your own.
MicroMacro wrote:I was wondering if I could use either of your color pickers in a project of mine? I don't know exactly what this project is yet, but I can see it being very useful. All credit will be given.
feel free to use and i will fix something in the later version, plz keep on focus of this lib.
Awesome! New version has much nicer mouse behaviour!
I'm going to be using a version of this in Colour Constructor, so your code is going to be used by hundreds of artists. I must say man, that's some damn dense code without any comments. I may upload a commented version after i work out how everything works if you don't mind?
I'm going to add in Bool's to stop things rotating as most artists just find it annoying, but i guess it's not hard to leave in an option to keep it rotating if you want.
Muzz wrote:Awesome! New version has much nicer mouse behaviour!
I'm going to be using a version of this in Colour Constructor, so your code is going to be used by hundreds of artists. I must say man, that's some damn dense code without any comments. I may upload a commented version after i work out how everything works if you don't mind?
I'm going to add in Bool's to stop things rotating as most artists just find it annoying, but i guess it's not hard to leave in an option to keep it rotating if you want.
thanks man, english is not my native language, i deleted comments in chinese :(。 just perform a surgery to this little one please