Skip to main content
Share Your Experience: Take the 2024 Developer Survey
53 votes
Accepted

Should I use "conventional" colors to represent item rarity?

Generally when there's a common convention that your audience may already be familiar with, the question isn't whether it's mandatory, but whether there's any reason to deviate from it. If you use a ...
DMGregory's user avatar
  • 135k
21 votes

Should I use "conventional" colors to represent item rarity?

The advantages to sticking with convention are: it works, and users are already familiar with it. The disadvantage is that you may be ignoring ways to improve and be unique. But on this subject, ...
congusbongus's user avatar
  • 14.8k
8 votes
Accepted

Pixel Picking vs Raycasting

Pixel picking is effective if you need to do lots of raycasts from one source. You bear the overhead of rendering and readback once, then get all your many picks at low incremental cost each. To get ...
DMGregory's user avatar
  • 135k
6 votes
Accepted

How do I get the object color?

Its actually simple. Just use Color32 class to get the r, b, g, a of your desired gameobject. Here is an Example Code. Here I used a cube gameobject and got the color of its material. ...
Shuvro Sarkar's user avatar
6 votes

What colour space or mixing algorithm should I use for "watercolor-like" colour mixing in-game?

To answer your question succinctly, RYB (red, yellow, blue) would be most intuitive and closest to mixing physical colors, aka pigments, which blend subtractively. To understand the mixing behavior ...
disc_code22's user avatar
5 votes
Accepted

Creating colour spectrum by light flux values

Here is a little help on getting you started with this rendering. This may not be the best way to accomplish this task however, it should work. First I created a structure to hold your data for ...
jgallant's user avatar
  • 8,424
5 votes

How to paint regions of a map with visually different colors

You could now go really deep into color theory to answer the question of what exactly makes two colors visually distinct. RGB is a color system for machines which doesn't map linearly to human ...
Philipp's user avatar
  • 120k
4 votes

How do I simulate color blindness for accessibility testing?

Windows 10 Settings In Settings app, there is a section of "Ease of Access".In this section, in the "Color filters" tab on the left, you can "Turn on color filters". This can simulate vision of ...
fakeinc's user avatar
  • 41
4 votes
Accepted

What is the benefit of YCbCr?

Chroma subsampling is usually used with YCbCr, that makes pics smaller. Say, 512x512 pic in rgb takes 768 kb. While same pic in YCbCr with 4:2:0 subsampling will take 384 kb. Sure, that's good only ...
Vlad's user avatar
  • 306
4 votes
Accepted

Color Correction in DirectX

Color correction is commonly done through post processing shaders. Basically first you render the scene to a framebuffer, then draw a fullscreen quad that has a shader that takes that framebuffer and ...
Aaro's user avatar
  • 128
4 votes
Accepted

draw a box with transparent background (outline) in unity

You could use the "9-slicing sprites" technique to cut up a fairly basic sprite texture and use that to draw the borders. Start by creating a fairly simple sprite - this one is 16x16, but it could ...
Zhaph - Ben Duguid's user avatar
4 votes
Accepted

What makes a shader function with a LineRenderer?

Color on a LineRenderer is represented as a color property on the vertices themselves. It behaves just like other vertex properties such as position and UV coordinates. However, vertex colors are ...
Ed Marty's user avatar
  • 5,229
4 votes
Accepted

How can I build an accurate 15-bit Highcolor RGB palette

It took a little while to stumble across and my understanding of bit operations is limited, but this discrepancy appears to be due to the data loss suffered when converting values from 24-bit to 15-...
baseten's user avatar
  • 171
4 votes
Accepted

Are there any practical applications for clearing the screen with a specific color?

Clearing the color buffer can be optional. For example, if you know that you're going to overwrite every pixel each frame, then you might decide to not clear at all. On the other hand, some drivers ...
Maximus Minimus's user avatar
3 votes

Game Design: Colour units per team or per unit type?

Humans are usually far better at spotting something of a different color than something of a different shape. Here is an example of an image with some blue pentagons: Among them is a red pentagon and ...
Philipp's user avatar
  • 120k
3 votes

Game Design: Colour units per team or per unit type?

Use colours for team identification and shapes and sizes for individual unit type differentiation. This means enemies and friendlies are instantly distinguishable, and unit types look distinct whilst ...
Huxellberger's user avatar
3 votes
Accepted

The meaning of colours in other cultures

Color symbolism in non-Western cultures (and even among Western cultures) is definitely incongruent. However, with regards to video games, typical Western and Japanese color symbolism is pretty ...
Jesse Williams's user avatar
3 votes
Accepted

Monogame - how to make a smooth color transition with Color.Lerp()?

If you look at the Color.Lerp documentation you'll notice that the third parameter is the amount. ...
craftworkgames's user avatar
3 votes

UI Text Won't Change Color in Unity 5

I got stuck on this same thing in this tutorial. My fix was to assign the font material to the text component's material directly underneath where you change it red.
Jared Browne's user avatar
3 votes

What is the best way to avoid colorblind issues?

You can use this palette from the article Color Universal Design (CUD) - How to make figures and presentations that are friendly to Colorblind people - by Masataka Okabe and Kei Ito. Another option ...
Philipp's user avatar
  • 120k
3 votes
Accepted

How to achieve this kind of look of a cube in a most efficient way?

I will be giving you two answers, The one for your actuall problem,and another one with a cube that has faces colored based on how much they are facing top: To simply create a Cube like that: Create ...
Guilherme Junqueira Coutinho's user avatar
3 votes

What exactly is the "blend factor" t in Color.Lerp?

The other answers correctly explain how the parameter works when you're using it something like this: ...
DMGregory's user avatar
  • 135k
3 votes
Accepted

Why only few parts of the 2D sprite change their colour when I apply sprite color in Unity?

You've mentioned that the rest of your pixels stay black. The way SpriteRenderer.Color is applied is via multiplication. The mentioned color field does not replace the pixel color but "tints" it. So ...
mt_'s user avatar
  • 576
3 votes
Accepted

Color of Image changes to white between 2 positions using Color.Lerp - Unity

This is because you are using Color as if it was a Color32. Color uses (float) values between 0 and 1 Color32 uses (byte) values between 0 and 255. So a value greater then one is clamped to 1 for ...
troien's user avatar
  • 906
3 votes

Does GPU mipmapping assume the texture is gamma corrected?

Taking from the OpenGL 4.4 specification: The contents of the derived arrays are computed by repeated, filtered reduction of the levelbase array. For one- and two-dimensional array and cube map ...
Maximus Minimus's user avatar
3 votes

How can I make the hue of a material change over time?

Here's how to write a shader that applies this effect. I'm assuming you want lighting, so I started this shader by right-clicking in the Project view and selecting Create -> Shader -> Standard ...
DMGregory's user avatar
  • 135k
3 votes
Accepted

How can I fully or partially colorize a SpriteRenderer and make its "color" value match the end result at 100% opacity?

After much trial and error, I was able to achieve what I wanted by modifing Unity's default "GUI/Text Shader" shader, which I downloaded from here under "Downloads (Win)" > &...
Pikamander2's user avatar
2 votes

What is the best way to avoid colorblind issues?

All the information you need is here, together with examples: http://gameaccessibilityguidelines.com/ensure-no-essential-information-is-conveyed-by-a-colour-alone First port of call is to avoid ...
Ian Hamilton's user avatar
2 votes

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

This question has many answers, but I wanted to touch more on accessibility. If I were in your scenario (needing to choose colors for an amount of things in a game that need to be perceived as ...
jodediah holems's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible