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
0
votes
1answer
55 views

Quality deterioration on a device

I am using Unity. When I try the game out in the IDE everything looks pretty good: But when I am trying to play the same game on a device the quality becomes a great deal worse and you can see it for ...
4
votes
2answers
246 views

How do I implement 2d color animation like in this video?

link on youtube at 1:38 - 1:42, purple things (I think this is particle system) that come off from the moon. Someone else had decompiled the game in the past, and the assets shows that the dark blue ...
2
votes
1answer
4k views

Sprite changes colour when imported into Unity

I create some simple geometrical shapes in Inkscape, then export it to PNG and import into Unity. Positive example: I make a rectangle of colour hsva(0, 0, 32, 255), export it as a 32x32 PNG image ...
1
vote
1answer
161 views

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

It might be a trivial question, but I couldn't come up with a simple solution. I need to create a cube like on the image below in Unity. As always, I target mobile ...
1
vote
2answers
438 views

Why do I get odd color effects in smooth transitions with OpenGL?

I am making a planet generator, and when I go too close to the planet, the smoothly colored surface has striations. Very visible striations, as seen in the attached image. The color transition is ...
0
votes
1answer
2k views

How can I accurately lerp Colors over seconds?

I have some code to lerp between two colors over a set number of seconds, and the lerp works fine: ...
1
vote
2answers
3k views

2D racetrack collision bounce using angle of reflection (bounce angle)

I am currently working on a race game where I want to define the collision of my vehicle with the outer and inner borders of the track. If that happens to be the case I want to vehicle to bounce of ...
36
votes
4answers
10k views

Should I use “conventional” colors to represent item rarity?

I'm making a new RPG that has loot. In fact, a majority of the game is based around loot. It's going to have colored borders to denote the rarity of the loot as it's drawn. WoW uses Grey, White, ...
1
vote
2answers
1k views

Flipping Textures in Modern OpenGL

How do I flip a texture in modern OpenGL (3.1+)? This is the unflipped render, keep in mind it is drawn with 8x8 tiles from a texture atlas, so I edited green squares below him into the image to ...
0
votes
1answer
55 views

Game Maker (and others): what data type is colour and how can I compare them?

In Game Maker, and I imagine other engines, one can "make colour" by defining either the red-green-blue values of the colour or its hue-value-saturation. I want to create a program that can compare ...
3
votes
1answer
4k views

How do I get the object color?

I want to get the object color, when I start the game. How do I do this? ...
1
vote
1answer
435 views

Can ARToolKit be used for color detection?

I'm trying to make an app that will show an object from different sides, but the target will be too small for any real marker detection. Think of a cube with one or two centimeter sides. The camera ...
0
votes
2answers
161 views

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

In an RTS game where the units are viewed from the top so that they appear relatively small on the screen: What would be the best game design? Colour the units per team, for example: enemy is always ...
3
votes
2answers
209 views

The meaning of colours in other cultures

According to http://www.color-wheel-pro.com/color-meaning.html and many other western websites certain colours have meanings. To summarise the meaning of colours in the context of a typical RTS game: ...
0
votes
1answer
121 views

glColor3f() 0.0 = no intensity 5.0 = full intensity?

I have a very weird behavior of openGL's glColor right now. I've wasted hours to detect why my line colors acting so weird until I found out that 0.0 rgb values is zero intensity and 5.0 lead to full ...
1
vote
1answer
1k views

What is Surface.set_colorkey() in Pygame?

In pygame, what does Surface.set_colorkey() do? Explain it in a very easy way please. Also, what exactly does it do? I heard it makes parts that are the same color ...
2
votes
1answer
339 views

Color Correction in DirectX

After playing games like Star Wars Battlefront & GTA 5 I was wondering how dev's implement Color Correction in their Engines. I know that this can be done through the use of 3D LUT's but I was ...
2
votes
1answer
617 views

Color spaces: Should colors be converted to linear color before applying premultiplied alpha?

For instance, when loading an image that is SRGB, which of these is correct? Simple premultiply: Take SRGB color from file and multiply RGB by alpha or Convert to linear before premultiply: Take ...
1
vote
1answer
182 views

Color mapping of difference

I have two arrays A and B. I want to do color mapping of their difference A - B. So far, I ...
2
votes
0answers
613 views

Linear color workflow with render to texture - Banding in alpha channel?

In OpenGL, I am using GL_SRGB8_ALPHA8 for the OpenGL internal texture format for my textures and render targets. This eliminated some banding I was seeing in dark ...
2
votes
1answer
75 views

How to save one color channel, taking only 1 byte per pixel?

How can I save only one color channel, such that it would only take 1 byte per pixel? I only want to save the alpha channel and apply colors later using a custom shader. But all the formats I tried ...
1
vote
2answers
626 views

Phaser BitmapData Pick Color and Paint

Hi guys, Could anyone kindly shows me a little bit of code about pick and paint color to the sprite? here is my code that I have played around, but I still cannot find out and achieve it. Thanks ...
3
votes
2answers
2k views

What is the benefit of YCbCr?

Why would someone want to store images as YCbCr instead of RGB in RAM or in GPU memory?
2
votes
1answer
68 views

Unity, Solid Color to link Platforms

[UNITY] As you can see above a solid color is connecting one platform to another. My question is whether this color must be applied through code or through a sprite. In my game there are three lanes ...
1
vote
0answers
74 views

How to color individual parts of curve in unity, real time?

So I have a mesh curve that I've imported from Blender. What I want to do is to place individual points on the curve (at fixed distance) and then based on a specific number, color them. Let's say for ...
0
votes
1answer
459 views

How can I duplicate this color/hue shifting effect in C#?

I am looking for a way to duplicate this color shifting effect: I don't think it matters but the starting frame would be this: My instinct was that some type of hue shift is occurring in a way that ...
4
votes
2answers
2k views

Gradient Banding in Unity Android

In an Android game, I have a gradient background that changes color over time. This was achieved by creating a 1x2 pixel texture in code, and stretching it over a large quad with bilinear filtering. ...
2
votes
1answer
170 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 ...
7
votes
1answer
2k views

Pixel Picking vs Raycasting

I was recently introduced to a way of picking in OpenGL known as pixel picking (or color picking). From my understanding, how this is done is that the scene is rendered to the back buffer with a ...
1
vote
1answer
387 views

Gameobjects disappearing when changing renderer.material.color

I'm generating an array of objects using this code: ...
0
votes
2answers
2k views

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

I would like to know how to dynamically change a color. My code: ...
1
vote
1answer
7k views

How to get a pixel color from a specific sprite on touch (unity)?

I have a 2 layers of a different sprites. How can i get a pixel color from lower sprite? I know how to get touch and world coordinates, but i have no idea what to do next. ...
8
votes
1answer
652 views

Cycling through colors with the same brightness

Ok. So I have a game I am working on with a bunch of colored particles. Each of them gets their own color however they are all close to a specific shade. To explain that better I am using the HSV ...
-2
votes
2answers
302 views

How do I properly combine the colors of different lights?

Let's say I have 4 light colors: (0.6,0.0,0.0), (0.0,0.6,0.0), (0.1,0.1,0.1), (0.1,0.1,0.1) And now I want to combine them properly. I can't add them together, ...
5
votes
3answers
4k views

UI Text Won't Change Color in Unity 5

In Unity 5 on Windows 10, I try to change the text color from the Inspector and in scripts, but the color won't change. Here are some screenshots of my Text objects open in the inspector, with there ...
3
votes
1answer
369 views

Is this converting from or to premultiplied alpha?

I found this code buried under some rocks: ...
3
votes
0answers
146 views

Bitmap font engine: When is color modulation not supported?

I am developing a bitmap font renderer for a 2D game using SDL 2. (If it matters, I'm using Debian 8 "jessie".) I had planned on storing the glyphs as a grayscale image, translating gray levels to ...
4
votes
1answer
1k views

How to reduce color space in a post-processing material in Unreal Engine 4

I'm trying to get an old-school Quake 1 look going in UE4. I am currently using this blueprint in order to get a retro style large pixel filter. In game (might need to zoom in to see the difference)...
1
vote
1answer
472 views

How do I make a 2D sprite flash green when tapped?

I have a sprite that is based on an image of a gray circle. When the user touches the sprite, I want the sprite to flash green, as in I want the circle to appear to turn green for 0.2 seconds. I tried ...
1
vote
2answers
749 views

SDL_LoadBMP into glTexImage2D results in scewed colors

I read up on this but i can not find the error. Some suggest switching the format from RBA to RGBA but the surface data says it is 3 byte data. Here are snippets and results of my source. Loading ...
2
votes
1answer
326 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 ...
4
votes
2answers
1k views

Color key or transparent images?

Ive seen a lot of people make sprite sheets magenta instead of transparent and then they make the magenta transparent using code. What is best (Performance) to use transparent images or use a color (...
3
votes
1answer
1k views

How can I use a lookup table for brightness and contrast?

Currently, I implemented a rudimentary brightness and contrast algorithm that changes brightness and contrast pixel by pixel. This was super inefficient performance wise and the algorithm looked a bit ...
12
votes
6answers
27k 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 ...
0
votes
2answers
76 views

How to determine areas of pixels of different colors or luminosities?

I want to create a program that determines all the areas of a given picture that have a different color, or the same color with different luminosities. Are there known algorithms that do this job ? I ...
0
votes
1answer
243 views

Is it possible to store diffuse and normal maps in the same texture area and preserve SRGB/linear space?

Usually, one would want to upload texture data to OpenGL with GL_SRGB* for the internalformat of a texture, and ...
0
votes
1answer
273 views

Why does RGB order differ between color formats?

On the reference page for SurfaceFormat, it indicates that the Bgra4444 format is an unsigned format which is 16-bits long, with 4 bits per color with alpha. ...
0
votes
2answers
3k views

Getting a color value from a coord

My goal is to get a RGB value of a pixel based of off a X,Y coordinate. I have been working on AIs for a small project attempting to make a bot that can pass through a maze. I want to get the pixel ...
0
votes
1answer
3k views

In Pygame, how can I check if an object is touching a color?

Is there a way to tell if a sprite is touching a specific color on the screen, maybe given as a hex code. I know you can do pygame.sprite.collide for sprites, but ...
2
votes
0answers
2k views

Easy way to set face colors with indexed VBOs?

I'm loading OBJs, which lend themselves well to setting up as indexed VBOs, since each vertex is only defined once and then a face definition will reference the same vertex more than once when they ...