Code:
Problem description:
Right now I'm working on a game and want to have a few different skin colors for players to be able to choose between.
Is there a way to code different color skins from one base icon? Or would I need separate colored bases for each icon?
If you didn't understand what I meant:
Let's just say that I have a white base icon, is there a way to use the rgb proc or something to make it a bit tanner? Or would there need to be a separate Tan colored base?
I'm kinda new to coding so can you guide me thru it a bit? lol
mob That's the thing I have for the mob icon, where exactly would I put the Icon.rgb part? |
Yep exactly. It's very simple. The base needs to be black though. To test it, create a new base icon that we'll use for this test and make it a white rectangle.
then add this code: mob/player You can use a combination of red,green and blue to create skin colors and I can confirm it'll work as if you had multiple base icons with different skin tones. |
It works lol and u said i need black base but is der a way to just do opp on white base? like rgb - instead of +
btw ur a good helper |
Yes it will work with a white base but the color combinations will be completely different. For example, it was quiet simple to make the black base red. All we needed to do is increase the R value to 255.
If we do Icon-=rgb(255,0,0) it wont have the same effect, so you'll have to keep trying to get the result you want but yep it can also be done. And thank you. Appreciated. |
If you have a white base, you can use the color variable. It's much faster than "icon +=" and "icon -=" because it doesn't involve /icon objects or the dynamic resource cache.
color = "red"
|
In response to Kaiochao
|
|
Kaiochao wrote:
If you have a white base, you can use the color variable. It's much faster than "icon +=" and "icon -=" because it doesn't involve /icon objects or the dynamic resource cache. > color = "red" He could if all he wanted were solid colors. He wants to create skin tones. He'll have to use the rgb() proc :/ |
In response to Kidpaddle45
|
|
Kidpaddle45 wrote:
Kaiochao wrote: > > color = "red" He could if all he wanted were solid colors. You can still use hex values or a call to RGB with the color proc though, like this: color = "blue" // Blue |
My preferred way to blend icons is to have one icon for color, one for highlights. The color icon is actually white and shades of gray, and is multiplied by the desired color. The highlight icon is then added to that.
If your highlights are only ever shades of gray, then you can achieve this with one icon using MapColors(). |
id just make a cacausain skin tone. And than add colour to it. I think that would get a good look though ive never tried it.
|
Tbh I think rgb would be better since I don't think I'ma need several bases in this case, just going to do a thing where ur default icon is like tanish, and you can add/take away brightness, making it brighter or darker
|
Icon.rgb(RED,GREEN,BLUE)