SFML community forums

General => SFML projects => Topic started by: EddyKuo on June 29, 2019, 06:07:48 pm

Title: SFML Color extension
Post by: EddyKuo on June 29, 2019, 06:07:48 pm
Since I found this library, I feel very easy to use. I often use this library to implement some small programs. This also makes me use C# for a long time, and return to the embrace of C++ again. When I use color, I found that the definition of Color class inside is not very much. So I wrote an extension about the Color class.

If you are also looking for something like a .net Color table. Then I think this is what you want

https://github.com/EddyKuo/SFMLColorExtension (https://github.com/EddyKuo/SFMLColorExtension)
Title: Re: SFML Color extension
Post by: Nexus on July 03, 2019, 09:48:14 pm
Since I found this library, I feel very easy to use. I often use this library to implement some small programs.
It's not a shame to declare yourself as the author of the library ;)

class ColorEx : public sf::Color { .. }
Your class has no member variables and member functions, but acts as a pure namespace. Neither inheritance nor a class is needed, namespace is what you are looking for.

Also, I would not use the namespace sf for extensions to SFML.
Nevertheless, this can be a useful collection of colors! :)
Title: Re: SFML Color extension
Post by: Sub on July 06, 2019, 03:04:17 am
More colors are of course nice.  I think what a truly useful color extension library truly needs though is multiple color spaces that you can easily convert between.