badger icon indicating copy to clipboard operation
badger copied to clipboard

Allow for RGB/Hex color choices

Open robertmatthewcook opened this issue 12 years ago • 15 comments

Let user enter color they would like in place of stock green and blue.

robertmatthewcook avatar Aug 14 '13 03:08 robertmatthewcook

Out of interest why would anyone really want this? Just curious. Can certainly be implemented.

mattdbr avatar Aug 21 '13 11:08 mattdbr

For harmonize with community logo. Our community - black back with ada symbol, for example.

stillru avatar Sep 14 '13 13:09 stillru

Definitely a good point @stillru.

Once the badge background is drawn completely with canvas (right now I'm just loading images onto the canvas), this will be possible.

therealklanni avatar Sep 15 '13 00:09 therealklanni

May be better use SVG file for rendering back image? SVG - just xml file. Color can be add by changing color in svg file.

stillru avatar Sep 18 '13 13:09 stillru

I will draw back today in the evening, after work.

stillru avatar Sep 18 '13 13:09 stillru

By the way, add some field like "Your status in community:" and change var in svg file you can change field "Member" to something like "Tactic Officer" or other....

Sorry for my bad english.

stillru avatar Sep 18 '13 17:09 stillru

@stillru using SVG to manage the background coloring is definitely worth considering (I actually used this method for coloring the level block), however it isn't the easiest process. I believe drawing to canvas will be easier to implement and manage. One point to consider is that the SVG must be included inline in the HTML in order for modifying its structure to work (based on my experience with implementing this with the level color), which has a lot of negative repercussions, such as making the index.html very large and more difficult to manage/maintain. Also I would like to keep the index.html as clean as possible to minimize the effort needed to modify the base HTML for those who want to customize the generator (see README.md community customization).

Let me know your thoughts. I am open to any input you have on this or any other solutions you may have in favor of using SVG over Canvas.

Thanks.

therealklanni avatar Sep 18 '13 18:09 therealklanni

https://gist.github.com/stillru/ef2f4451a6b5351805ca - gist for back and front.

stillru avatar Sep 19 '13 08:09 stillru

Good work with that proof of concept. If you want to implement that using paperjs and submit a pull request to develop that would be awesome. We can do any fine-tuning and tie it in with the rest of the app there. I definitely appreciate your contributions.

therealklanni avatar Sep 19 '13 17:09 therealklanni

http://paperjs.org - This?

stillru avatar Sep 19 '13 18:09 stillru

Correct

therealklanni avatar Sep 19 '13 18:09 therealklanni

https://gist.github.com/stillru/f1e1d75426ce4eaba51d#file-paperjs-front

stillru avatar Sep 20 '13 08:09 stillru

Implementing this to real project - hard to me. I will try but it will be loooong time...

stillru avatar Sep 20 '13 08:09 stillru

https://gist.github.com/stillru/9fe7d0b52298b60c40e2 - tested in master branch, dist directory. Later create marege request

WARNING! BREAK PRINTING ANS SAVE FUNCTION!!!

stillru avatar Sep 20 '13 12:09 stillru

@stillru I'm not sure what you're trying to say in your last comment, sorry.

Also please remember to work in develop branch and submit pull requests to develop only, not master. Just bringing it up because you mentioned testing in master branch. Not sure if that was a typo.

Thanks.

therealklanni avatar Sep 20 '13 22:09 therealklanni