SFML community forums

General => Feature requests => Topic started by: masskiller on October 07, 2012, 06:15:42 am

Title: HSL Color Standard
Post by: masskiller on October 07, 2012, 06:15:42 am
I'd like to propose to add the HSL (Hue, Saturation, Luminance) Coloring to SFML.

I have been investigating HSL Coloring system for a bit, while it's true that it's nowhere near as useful as RGBA is, however it allows easy color transformations such as colorizing an image with a given color in an easy way.

Here's an example: http://www.tannerhelland.com/3552/colorize-image-vb6/ (http://www.tannerhelland.com/3552/colorize-image-vb6/)

This cannot be done in an easy way with RGB and I think that it would give the library another powerful tool if implemented. I don't think that HSL is good for being able to be used the same way as RGB, yet still to be able to colorize and manipulate colors in that way and give the user that freedom is what gave me the idea to suggest this into SFML.

So what do you think about this? Is it a good idea or not practical at all? I am implementing it myself for my game, but I think it'd be nice to see this in a future version of SFML.
Title: Re: HSL Color Standard
Post by: Laurent on October 07, 2012, 09:50:07 am
This is something that doesn't require modifications to SFML, it can (and must) be written on top of sf::Color. So I don't see good reasons for integrating it directly.

But you can share your code on the wiki ;)
Title: Re: HSL Color Standard
Post by: Nexus on October 07, 2012, 10:57:21 am
I have already thought about adding a HSV or HSL color class to Thor. But don't expect it too soon, I'm still stuck with other design issues (particles/animations) :)
Title: Re: HSL Color Standard
Post by: masskiller on October 09, 2012, 12:16:49 am
Quote
But you can share your code on the wiki ;)

I'm nearly done with it, as soon as I am done implementing what's left and documenting it I'll share it.
Title: Re: HSL Color Standard
Post by: quarks on October 17, 2012, 11:23:09 pm
I don't see any license inormation for this piece of code:
https://github.com/SFML/SFML/wiki/SourceHSLColor

Maybe the author is still arround ?

In case so, may I suggest you to add the same license header than SFML ?

Otherwise the only things we can do is either to read it only, or stealing it in the copyright violation way.

Thanks for your understanding
Title: Re: HSL Color Standard
Post by: eXpl0it3r on October 17, 2012, 11:45:47 pm
Well mostly don't include any license... I guess Laurent will introduce a rule that if not otherwise specified the code provided in the wiki will be in the public domain. I'd also say that's mostly what the authors think of, otherwise they wouldn't publicise code there. ;)

If you look at the page history (https://github.com/SFML/SFML/wiki/SourceHSLColor/_history) then you see that the original author is maskedkiller01 which sounds suspicously similar to masskiller...
And there was an edit just a few minutes ago by blue-prawn, that's either quarks or this user (http://en.sfml-dev.org/forums/index.php?action=profile;u=6969). ;)
Title: Re: HSL Color Standard
Post by: quarks on October 18, 2012, 12:32:39 am
If you look at the page history (https://github.com/SFML/SFML/wiki/SourceHSLColor/_history) then you see that the original author is maskedkiller01 which sounds suspicously similar to masskiller...

Obviously :)

And there was an edit just a few minutes ago by blue-prawn, that's either quarks or this user (http://en.sfml-dev.org/forums/index.php?action=profile;u=6969). ;)

And ?

OK, there is this page too: https://github.com/SFML/SFML/wiki/Tutorial:-Manage-dynamic-key-binding
from "eXpl0it3r" which is probably the same than on the forum "eXpl0it3r", also edited by "blue-prawn" 6 minutes ago

So may I assume that the code that you provide on the wiki is public domain?
Title: Re: HSL Color Standard
Post by: eXpl0it3r on October 18, 2012, 12:45:12 am
So may I assume that the code that you provide on the wiki is public domain?
This isn't my code... I'm not sure how GitHub handles these pages but for some reason it doesn't show the first change... So maybe one can't go after the history. :-\
Title: Re: HSL Color Standard
Post by: quarks on October 18, 2012, 12:51:17 am
This isn't my code... I'm not sure how GitHub handles these pages but for some reason it doesn't show the first change... So maybe one can't go after the history. :-\

Great!
this is very handy to contact the original authors, to ask them about licensing issues.

On the old wiki, I found this:
http://www.sfml-dev.org/wiki/en/sources/pausableclock

I was able to ask the author if he accepts to switch from cc-by-sa to the same license than SFML.
He accepted.

IMO we should fix the licensing issue on the wiki before there are too many things.

Also I noticed later that the code from "PausableClock" seems to be the same than here:
https://github.com/Bromeon/Thor/blob/master/src/StopWatch.cpp

but the name of the author is different !??
Title: Re: HSL Color Standard
Post by: eXpl0it3r on October 18, 2012, 01:05:31 am
IMO we should fix the licensing issue on the wiki before there are too many things.
Yeah... Laurent? ;D

Also I noticed later that the code from "PausableClock" seems to be the same than here:
https://github.com/Bromeon/Thor/blob/master/src/StopWatch.cpp

but the name of the author is different !??
I've no idea how you'd think that this is the same code... ???
Make a diff and you won't find any matches.
And for the idea, you can't copyright that...

But all that beside the one author is Hirua and the other is Nexus and I think they know each other from the forum well enough to not fighter over such code ideas. Both are contributing extensively to SFML so worry not... ;)

Ah, and Thor as the same license than SFML, so you can do with that code whatever you want. :D
Title: Re: HSL Color Standard
Post by: quarks on October 18, 2012, 01:19:57 am
I've no idea how you'd think that this is the same code... ???
Make a diff and you won't find any matches.

This is the same code, only the variable and class names are different.
The implementation is exactly the same, while one could implement this in different ways.
So please...


But all that beside the one author is Hirua and the other is Nexus and I think they know each other from the forum well enough to not fighter over such code ideas. Both are contributing extensively to SFML so worry not... ;)

Of course noone will raise a trial for 10 lines of code.
When I read this, I was just surprised to see the same code without cite the original author.

Title: Re: HSL Color Standard
Post by: FRex on October 18, 2012, 02:06:03 am
Chances are that if you told us the interface and functionality these two have, we would write similar code without knowing the original code. There's only so many ways to implement things.
Quote
And for the idea, you can't copyright that...
I like to point out how much I hate Apple in moments like that. ;D
Title: Re: HSL Color Standard
Post by: Laurent on October 18, 2012, 08:07:02 am
Quote
Yeah... Laurent?
I don't have the time to manage the wiki. There are so many things to do on it (fix the titles/page names, change the rules, add the default license, review the recent modifications and additions, ...).

It would be great if someone could manage this wiki ;D
Title: Re: HSL Color Standard
Post by: eXpl0it3r on October 18, 2012, 08:18:37 am
It would be great if someone could manage this wiki ;D
I guess I could do some stuff... ;)
I'm unsure though, if it makes sense to change all the titles, because it will probably break every link on the forum to a specific topic, then again that's just a small problem and the bigger win would be a nice title naming scheme... ;)
Title: Re: HSL Color Standard
Post by: Laurent on October 18, 2012, 08:20:21 am
Yeah, I don't know exactly how to handle existing URLs. But since github change the way they work, something must be done. At least update the rules.
Title: Re: Wiki
Post by: quarks on October 18, 2012, 05:43:30 pm
If we change page naming scheme, maybe we can manage keeping existing links in the same way than we do with mediawiki (wikipedia and rosettacode), with just a #redirect "NewName" in the old page.
I don't know if github wiki is able to manage this.

I would be pleased to help with the wiki.

The things I would be happy to do are:
- contact all the contributors to ask for a license change (Laurent or the community have to choose a license first)
- check for all code samples to have a consistent formating
- rename pages with a consistent naming scheme
- maybe import the most important/usefull contents from the old wiki (also needs to contact authors)
- maybe other things, if you provide a TODO list

But to do so I would need your help arround because I know mediawiki quite well, but I just created a github account to access SFML's wiki.

By the way I don't know how to rename a page. Github's wiki even renamed a page I've created yesterday, by removing the case.
I've not found yet how to contact (private message) someone from his github account.

Also I've noticed that this appeared on my newly created account:
https://github.com/blue-prawn/SFML
I do not have planed to fork SFML, and I don't remember having done something even by accident, so why is this thing here ? how can I remove it ?
Title: Re: HSL Color Standard
Post by: eXpl0it3r on October 18, 2012, 05:53:25 pm
Well for wiki page renaming you're kind of late... See here (http://en.sfml-dev.org/forums/index.php?topic=9429.0). ;)
GitHub does not support redirects, and creating x dummy pages just with a link to the new page doesn't seem like a nice solution. It would not only make the wiki pages have a nice overview, but it will also prevent people from actually changing the links...

As for the importing entries from the old into the new wiki, I don't see really see a need for contacting the authors. I mean if it's at place A or at place B doesn't really matter and since it's still the wiki of SFML and not some other project you don't actually change anything.

Also see this thread about a default license (http://en.sfml-dev.org/forums/index.php?topic=9428.0), but feel free to contact every contributor (if you find out who's behind the projects). :)

As for the consistent formatting, you should make the decision probably for each wiki page, because every developer has a different idea of what 'the correct way' is and many probably won't like your style. So if you find some irregularities within the source code of someone, feel free to change it, but changing every code to your style won't please everyone. ;)

Also you must have once clicked "Fork" on the SFML GitHub site. It then automatically forks SFML, if you want it to or not. But you can easily remove it again (Admin->Repositories or similar).

Quote
Github's wiki even renamed a page I've created yesterday
No, that was probably me. ;D
Title: Re: Wiki
Post by: quarks on October 18, 2012, 07:35:05 pm
Well for wiki page renaming you're kind of late...

Please avoid acerbic tone.

I was refering to this (in this same thread):

I'm unsure though, if it makes sense to change all the titles, because it will probably break every link on the forum to a specific topic, then again that's just a small problem and the bigger win would be a nice title naming scheme... ;)

Yeah, I don't know exactly how to handle existing URLs. But since github change the way they work, something must be done. At least update the rules.

Title: Re: HSL Color Standard
Post by: quarks on October 18, 2012, 07:35:55 pm
As for the importing entries from the old into the new wiki, I don't see really see a need for contacting the authors. I mean if it's at place A or at place B doesn't really matter and since it's still the wiki of SFML and not some other project you don't actually change anything.

Also see this thread about a default license (http://en.sfml-dev.org/forums/index.php?topic=9428.0), but feel free to contact every contributor (if you find out who's behind the projects). :)

If the license is not the same, we should ask the authors for changing the license of their content.
Title: Re: Wiki
Post by: quarks on October 18, 2012, 07:43:21 pm
As for the consistent formatting, you should make the decision probably for each wiki page, because every developer has a different idea of what 'the correct way' is and many probably won't like your style. So if you find some irregularities within the source code of someone, feel free to change it, but changing every code to your style won't please everyone. ;)

No, this is not what I meant.
I mean when there are real formating errors. Like different levels in the same block of code, or real inconsistency. (There was some in the HSL piece of code.)
The point is to keep code readable, not to change the style of the original author.

Also some people read pages on small screens. Other people use bigger font size than the original submiter. So very long lines of code (more than 120) are sometimes impossible to read until the end.
Title: Re: HSL Color Standard
Post by: quarks on October 18, 2012, 07:46:57 pm
Also you must have once clicked "Fork" on the SFML GitHub site. It then automatically forks SFML, if you want it to or not. But you can easily remove it again (Admin->Repositories or similar).

Maybe, because there are several display bugs for github with the web browser I use.
But still I don't think so, because I also see forks without any changes on the page of the other people that have contribute to the wiki. I know that github will automatically fork if one makes a pull request, so mabe there's something similar for the wiki?
Title: Re: Wiki
Post by: eXpl0it3r on October 18, 2012, 11:03:21 pm
Please avoid acerbic tone.

I was refering to this (in this same thread):
[...]

:o
There wasn't any tone in my sentence I just said the obvious truth. ;D
And if you still didn't get it, I've already changed all the titles and page names, there is nothing to be done anymore and if you had read the linked thread you'd also see that now all the links are broken. So the decision has already been made and executed, thus if you were willing to do it, you're already too late, because it already happened. Get it? :D

Please don't write a post for each quote, it makes it much harder to read and uses a lot of unnecessary space... :-\

If the license is not the same, we should ask the authors for changing the license of their content.
Sure! ;)
It's just for the future entries and for the ones you can't reach. We've already informed every reader of the forum with the other thread I linked, so they know, if they want a different license they have to change it now, otherwise the default license will apply.

Maybe, because there are several display bugs for github with the web browser I use.
But still I don't think so, because I also see forks without any changes on the page of the other people that have contribute to the wiki. I know that github will automatically fork if one makes a pull request, so mabe there's something similar for the wiki?
You got some strange assumption there. ???
Just because the browser does show somethings differently won't change the data on the GitHub servers. ^^
Could be that there's some other way how you get a fork, but I did never get one when editing the wiki. But like I said just remove it and everything is fine again. :D

@Laurent: Could you please make this discussion into an own thread since it doesn't have anything to do with the HSL code... ;)
Title: Re: HSL Color Standard
Post by: masskiller on October 19, 2012, 06:14:33 am
Quote
This is the same code, only the variable and class names are different.
The implementation is exactly the same, while one could implement this in different ways.
So please...

I strongly support this argument, the formula for conversion is not mine at all, I just took it and put it in C++ after trying to comprehend it a bit. Then again while I get quarks' point for making a big fuss over code copyrights, in my case I currently just don't care if my code gets stolen or used/modified in anyway (18 year old student with no "real" work experience). I just wanted to help out and save others from the headaches concealed if this types of functions.

Quote
No, this is not what I meant.
I mean when there are real formating errors. Like different levels in the same block of code, or real inconsistency. (There was some in the HSL piece of code.)
The point is to keep code readable, not to change the style of the original author.

This was my bad, it was my first time trying to put something into the wiki and after two hours of trying I just gave up. I just checked it and saw that eXpl0it3r took the time to fix it while I had left my page untouched for over a week, thanks and sorry for the inconvenience.

Quote
Sure! ;)
It's just for the future entries and for the ones you can't reach. We've already informed every reader of the forum with the other thread I linked, so they know, if they want a different license they have to change it now, otherwise the default license will apply.

I am young and ignorant in regards to this, if there is anything I should learn to not have an issue like this again happen with my code I'm willing to learn.






Title: Re: Wiki
Post by: guarks on October 19, 2012, 09:34:45 pm
Quote
Quote
Please avoid acerbic tone.

:o
There wasn't any tone in my sentence I just said the obvious truth. ;D
And if you still didn't get it, I've already changed all the titles and page names, there is nothing to be done anymore and if you had read the linked thread you'd also see that now all the links are broken. So the decision has already been made and executed, thus if you were willing to do it, you're already too late, because it already happened. Get it? :D

Thank you for your work on the wiki. It is indeed better now.
But the "obvious truth" as you said is that you did that after we started to talk about it.

For the acerbity, I guess you don't talk to your customers or boss or teacher that way.
Please do not do it here too.
Title: Re: Wiki
Post by: guarks on October 19, 2012, 09:39:10 pm
Quote
Please don't write a post for each quote, it makes it much harder to read and uses a lot of unnecessary space... :-\

my teachers taught us to do so: "one subject = one message"

I'm not the kind to follow blindly what I'm taught. I've tryed with and without, and in practice I can say that this is always the better option.
Sometimes I don't because it's a little bit harder to do, and takes more time, but when I don't it happens quite often that I have to regret it.

I would recommend everyone to do the same, being for emails, posts, and even phone calls.
Title: Re: Wiki
Post by: guarks on October 19, 2012, 09:43:41 pm
Quote
Quote
If the license is not the same, we should ask the authors for changing the license of their content.
Sure! ;)
It's just for the future entries and for the ones you can't reach. We've already informed every reader of the forum with the other thread I linked, so they know, if they want a different license they have to change it now, otherwise the default license will apply.

We can not assume that wiki contributors will read this message on the forum.

We need a real and explicit approbation of the authors to change their content licensing.
Title: Re: Wiki
Post by: guarks on October 19, 2012, 09:46:30 pm
Quote
You got some strange assumption there. ???
Just because the browser does show somethings differently won't change the data on the GitHub servers. ^^

The "logout" button is just displayed as an empty rectangle, so I had to try click on it to see that's the logout button.

Maybe the "fork" button is also displayed in a buggy way, and maybe I've clicked on it by accident.
Title: Re: HSL Color Standard
Post by: guarks on October 19, 2012, 09:57:04 pm
Quote
This is the same code, only the variable and class names are different.
The implementation is exactly the same, while one could implement this in different ways.
So please...

I strongly support this argument, the formula for conversion is not mine at all, I just took it and put it in C++ after trying to comprehend it a bit. Then again while I get quarks' point for making a big fuss over code copyrights, in my case I currently just don't care if my code gets stolen or used/modified in anyway (18 year old student with no "real" work experience). I just wanted to help out and save others from the headaches concealed if this types of functions.

I just said that I was surprised to read the same piece of code with different author names. I'm not the police.

In practice I know that a lot of people who provide code don't really care, or even don't care at all.
But I also know that there are also a lot of people who care a lot about their code and the licensing they have chosen.
Title: Re: HSL Color Standard
Post by: guarks on October 19, 2012, 09:59:52 pm
Quote
No, this is not what I meant.
I mean when there are real formating errors. Like different levels in the same block of code, or real inconsistency. (There was some in the HSL piece of code.)
The point is to keep code readable, not to change the style of the original author.

This was my bad, it was my first time trying to put something into the wiki and after two hours of trying I just gave up. I just checked it and saw that eXpl0it3r took the time to fix it while I had left my page untouched for over a week, thanks and sorry for the inconvenience.

Don't worry, wikis are made for this.
Just dump your draft, and don't loose your time.
Someone will correct if it needs so.
Title: Re: HSL Color Standard
Post by: FRex on October 19, 2012, 10:07:31 pm
Quote
my teachers taught us to do so: "one subject = one message"
Over a quarter of the space you used was the space between posts.
Quote
For the acerbity, I guess you don't talk to your customers or boss or teacher that way.
Last time I checked exploiter was not your student or employee..
Quote
We need a real and explicit approbation of the authors to change their content licensing.
Why? What were they thinking when putting it there and not in projects forum or on own website? If anything there should be a rule that everything is under zlib or MIT with deafulting to zlib if not specified, else it goes to projects forum. What is the use of a wiki that is a projects catalogue instead of being quick free solution to problems?
Title: Re: HSL Color Standard
Post by: masskiller on October 19, 2012, 10:14:17 pm
Quote
my teachers taught us to do so: "one subject = one message"

I'm not the kind to follow blindly what I'm taught. I've tryed with and without, and in practice I can say that this is always the better option.
Sometimes I don't because it's a little bit harder to do, and takes more time, but when I don't it happens quite often that I have to regret it.

I would recommend everyone to do the same, being for emails, posts, and even phone calls.

While you may like it and your idea does make some sense it's totally unpractical, just quoting this took a lot of unnecessary scrolling. I learned to use many quotes in one post in forum debates, when you are in a hard to swallow debate making a post for every single thing only creates spam and lack of control over what you write (in my opinion).

Of course this isn't anything similar to a debate, but it's still nicer to read when stuff like this is in the same post. The new quote is the one that implicitly marks the change in subject within the post.

Quote
I just said that I was surprised to read the same piece of code with different author names. I'm not the police.

The username I use here was already taken, so I was forced to use my alternative one.



Title: Re: HSL Color Standard
Post by: guarks on October 19, 2012, 10:18:28 pm
Quote
Last time I checked exploiter was not your student or employee..

Yes, but it's requested to stay polite and friendly.
Title: Re: HSL Color Standard
Post by: guarks on October 19, 2012, 10:18:48 pm
I am young and ignorant in regards to this, if there is anything I should learn to not have an issue like this again happen with my code I'm willing to learn.

Just have a look how other people provide their code.

For a project, usually it's recommanded to add a header in every source code file.

Some Debian packagers will also ask you to add a text file information for every single images, not only tell in the readme file that all images are released under the foo license.

But most of them are not that extremists.
It seems for example that the Debian SFML packager didn't said anything about sounds and images in SFML.

One day a Debian packager even asked me to add a licensing header in the README file!
This was very surprising to me because I don't see licensing information in most free softwares and libs.

Anyway, usually the header in every source file is enough.

For wikis, just see at the bottom of the pages.
Even then you can usually provide your content with alternative conditions.
If you do so this usually means that someone can choose between the default wiki conditions OR the one you added at the beginning of your code.
But sometimes it may also replace it, so people can only take your content with your conditions, and not the one from you.
Sometimes the wiki forbids another conditions from the authors.

Wikipedia doesn't allow other conditions than the default one.
Rosettacode allow contributors to provide alternative conditions.
Title: Re: HSL Color Standard
Post by: guarks on October 19, 2012, 10:25:14 pm
Quote
While you may like it and your idea does make some sense it's totally unpractical, just quoting this took a lot of unnecessary scrolling. I learned to use many quotes in one post in forum debates, when you are in a hard to swallow debate making a post for every single thing only creates spam and lack of control over what you write (in my opinion).

Of course this isn't anything similar to a debate, but it's still nicer to read when stuff like this is in the same post. The new quote is the one that implicitly marks the change in subject within the post.

If this becomes the policy of this forum, I'll follow it.

But I think that this way of posting also has advantage for moderation.
The moderator can then remove the posts with flames, and keep the ones with usual discuss.

I don't know how the forum engine works, but maybe this would also allow to split threads.
Title: Re: HSL Color Standard
Post by: eXpl0it3r on October 20, 2012, 01:10:43 pm
But the "obvious truth" as you said is that you did that after we started to talk about it.
When people link stuff or say something they imply that you as reader are going to check that out and if you had done it, it would've been obvious that things have changed. That I've made a decision without further discussion would have been a logical implication.

For the acerbity, I guess you don't talk to your customers or boss or teacher that way.
Please do not do it here too.
Yes, but it's requested to stay polite and friendly.
As I often like to say: "I'm only responsible for what I say and not for what others might hear."
I didn't use any strange tone and it wasn't my intention to do so. I simply state the fact that you were already too late for that topic and yes, I would talk that way to my teacher/boss/professor, since as I already said (for the third time now) that there was no acerbity and it was only you that interpreted it that way. ;)

my teachers taught us to do so: "one subject = one message"
I'm not the kind to follow blindly what I'm taught.
I've tryed with and without, and in practice I can say that this is always the better option.
Sometimes I don't because it's a little bit harder to do, and takes more time, but when I don't it happens quite often that I have to regret it.
So only after you've tried both your gonna follow that blindly? ;)

If this becomes the policy of this forum, I'll follow it.
I've been on quite many forums and I've never run into someone or even a forum rule who/that would enforce such a way of posting. You can gladly search through this forum and you won't find anyone that has posted 6 posts in a row to one discussion. So although it's not a written rule on any forum, it's a implicit rule that most everyone follows and you should too.
Or can you show me a forum that uses this way of posting?

I would recommend everyone to do the same, being for emails, posts, and even phone calls.
So when you have two questions for someone, you call him ask the question, hang up call him again and ask the second question? ;D
Such statements can not be applied to every situation and I strongly advise against it in most situations.

But I think that this way of posting also has advantage for moderation.
The moderator can then remove the posts with flames, and keep the ones with usual discuss.
Not really it's a pain in the ass if the moderator has to edit 10 posts, instead of just editing one...
And if he wants to remove stuff there's no extra work if it's a single post or not.
Besides this forum does not have any moderator and nearly nothing gets removed. Laurent is the only one that can edit posts.
(Otherwise I'd have split this discussion into a new one long ago and merge your X posts into one... ;) )


A general advice for rounding up this part of the discussion: If you're very new to a forum and users with quite a few posts more or one of the most active member of the forum tells you how you should go about handling the forum, it's probably for the better to follow their advice. Not only will they mostly be right but you also show them some respect... ;)
Every forum has their own unwritten rules and you first always have to find out how things are handled in forum instead of making your own assumptions and your own rules. :)

For the wiki license discussion I suggest you keep talking in this thread (http://en.sfml-dev.org/forums/index.php?topic=9428.0).
Title: Re: HSL Color Standard
Post by: Nexus on October 20, 2012, 02:18:14 pm
In many forums, already double-posts are proscribed, not to mention 6 in a row. It really adds confusion to a discussion, please don't do it.

If there are two posts in a row, because you see, that during posting somebody else has written a post you want to refer to, it's okay. As well if you have a project thread and announce news from time to time. But not if you could directly write one post, which would be much clearer for a discussion flow and which wouldn't span the topic unnecessarily across multiple pages.
Title: Re: HSL Color Standard
Post by: xylr117z4 on October 20, 2012, 06:35:31 pm
Git hub doesn't load correctly for my current work station so I'll have to look over the orginial authors implementation above but I do see how HSL control would be useful. 
For example using a grayscale default character sprite you could color it "in-game," or rather during run time for multiple players without the need to load 4 seperate images.
Title: Re: HSL Color Standard
Post by: masskiller on October 20, 2012, 08:10:45 pm
Git hub doesn't load correctly for my current work station so I'll have to look over the orginial authors implementation above but I do see how HSL control would be useful. 
For example using a grayscale default character sprite you could color it "in-game," or rather during run time for multiple players without the need to load 4 seperate images.

Exactly, but that's not just it, you can by removing all saturation from every pixel you can make it grayscale, make a dark image into a bright one or make gradients like it was nothing. It grants you a whole lot more of control that RGB doesn't. You just convert, do whatever you want and reconvert.
Title: Re: HSL Color Standard
Post by: xylr117z4 on October 20, 2012, 09:08:38 pm
Exactly, but that's not just it, you can by removing all saturation from every pixel you can make it grayscale, make a dark image into a bright one or make gradients like it was nothing. It grants you a whole lot more of control that RGB doesn't. You just convert, do whatever you want and reconvert.

I actually did find your HSL class on Git hub it's just the link posted had since been broken...

It's something that would be really useful and it's something that I think would fit sfml's purpose if it were integrated.  Once I get off I'll have to try making a quick test program with the class because it would be useful for a project my buddy has been working on (which happens to be a verticle shooter much like the one you're attempting to create, other than it being less of a bullet hell.)

Title: Re: HSL Color Standard
Post by: masskiller on October 20, 2012, 11:52:46 pm
Quote
I actually did find your HSL class on Git hub it's just the link posted had since been broken...

Is the link still broken? I just checked and it's fine, in any case here it is: https://github.com/SFML/SFML/wiki/Source%3A-HSL-Color (https://github.com/SFML/SFML/wiki/Source%3A-HSL-Color)

Quote
It's something that would be really useful and it's something that I think would fit sfml's purpose if it were integrated.

It most likely won't be integrated since it's something entirely external that doesn't require any change in the library whatsoever (paraphrasing Laurent), but Thor will add HSL/HSV and there's my implementation of it as well so feel free to use it at will.

Title: Re: HSL Color Standard
Post by: xylr117z4 on October 21, 2012, 12:25:25 am
It most likely won't be integrated since it's something entirely external that doesn't require any change in the library whatsoever (paraphrasing Laurent), but Thor will add HSL/HSV and there's my implementation of it as well so feel free to use it at will.

well it doesn't really change anything but I think it would be nice to be like sf::Color(H,S,L); as well as sf::Color(R,G,B and some times A);

...but I guess that would just be in the declaration actually using HSL for colorizing would probably be better done in it's own class.