Questions tagged [color]

Color is the visual perception of light by humans into named categories, commonly "red," "green," and "blue."

Filter by
Sorted by
Tagged with
311 votes
14 answers
27k views

How can I find an optimum set of colors for 10 players?

I want to give each of 10 players a unique identifying color. Is there an optimum set of colors for this? How do I create one? Every set I've come up with contains colors that are too similar. ...
David Thielen's user avatar
36 votes
11 answers
2k views

What is the best way to avoid colorblind issues?

About 5-10% of males have some form of colorblindness. What's the best way to ensure you are not turning away 5-10% of your male population from your game? Just to note colorblindness does not mean ...
Pyrolistical's user avatar
8 votes
2 answers
1k views

Making a symbol appear on any colour

I'm developing an RPG/roguelike-style game. Instead of having maps like: ......... ......... ....@.... ...h..... Oh look, a dwarf. I was having solid background ...
PrettyPrincessKitty FS's user avatar
10 votes
6 answers
1k views

What's a good alternative to colored tiles to account for color blindness?

I have a game with tiles. Each tile is a number, and each number is one of six colors. The color is important to the game play, and I want to make the game available to those who are color blind. ...
fbrereto's user avatar
  • 423
7 votes
2 answers
2k views

How do I change a sprite's color?

In my rhythm game, I have a note object which can be of a different color depending on the note chart. I could use a sprite sheet with all the different color variations I use, but I would prefer to ...
Mr_Qqn's user avatar
  • 392
3 votes
1 answer
2k views

Apply Vertex Colors to XNA Spritebatch sprites

I know that you can use custom vertex and pixel shaders using SpriteBatch but I can't figure out how to apply colors to individual vertex points on a sprite generated by spritebatch. All I can do is ...
Steve's user avatar
  • 55
0 votes
2 answers
2k views

XNA change a specific color of a model to another

Is it possible to change a specific color of a model to another? Example: Everything that's blue should be red or something like that. And is it possible to do this without the use of effects? I ...
user1990950's user avatar
29 votes
4 answers
73k views

How can I include vertex color information in .OBJ files?

The .obj files I export are missing data for vertex colors. Is there a way to include color information in the .obj file? If not, what are the alternatives?
Mina Wissa's user avatar
13 votes
8 answers
35k views

How to Color.Lerp between multiple colors?

I have found it rather difficult to find a solution to this in the Unity documents. Color.Lerp(Color a, Color b, float t) is a function that gradually changes a ...
Zee's user avatar
  • 932
4 votes
2 answers
776 views

Programatically replace color gradient on sprite

Say I have the following image: I want to tint the yellow parts on this sprites shoulder/arms by a random color. In other questions on this site, they suggest using a chroma key and replacing the ...
Benixo's user avatar
  • 669
4 votes
1 answer
2k views

When should I use color keying vs PNG transparency?

SDL (and other toolkits) can use color keying to make a certain color in an image transparent. Alternatively, you could load a PNG image that supports transparency. When should I use which?
user44066's user avatar
4 votes
2 answers
4k views

Palette reduction to pre-defined palette

I'm writing a bunch of GLSL effects for fun, but I can't wrap my head around this. Basically, I want to reduce a texture's palette into a pre-defined set of colors. For example, a post-processing ...
manabreak's user avatar
  • 1,048
2 votes
1 answer
427 views

Math behind XNA's spriteBatch.draw() color parameter?

I'm trying to make a shader that changes the color of a sprite the way the XNA spriteBatch.draw() color parameter changes color. I don't know exactly what it is called (the closest word I can think of ...
Quintin Steiner's user avatar
1 vote
1 answer
207 views

Creating colour spectrum by light flux values

I am using radiosity method to compute the inter-reflected light within a room. The room is gridded into small patches and the light flux in lumen is calculated for each. This part is done. Now I want ...
ali's user avatar
  • 167
0 votes
1 answer
612 views

Creating a gradient for a texture - Why is the color becoming dark on one side?

Updated While debugging I looked at the lerp and it was calculating into a negative number at the start. So I added in checks for to low or high a value, and that seems to have fixed it. I'll answer ...
Thraka's user avatar
  • 465