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

learn more… | top users | synonyms

0
votes
0answers
16 views

How to separate player's planets (between each others) in a massive multiplayer game?

The game consists in commanding several planets; The universe is made of galaxies; You play in one galaxy at the time and when you level up you go into another galaxy; Each galaxy have around 10 ...
0
votes
0answers
58 views

Automatic gamma correction on DX11

Trying to figure out how to get automatic gamma correction on DX11. I'm using deferred shading. I'm not exactly sure exactly which textures needs to be in the SRGB format. Here's my guess: The ...
0
votes
2answers
40 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 ...
1
vote
0answers
58 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 ...
2
votes
1answer
49 views

How can I tint a Texture2D with a gradient?

I am working on a lighting system for my game. Instead of lighting each tile completely with only one color, I want to create a gradient on that tile so to make the lighting look more dynamic and ...
2
votes
1answer
116 views

How do I multiply two RGBA colours?

I have two RGBA integers. What procedure should I perform on them to return the multiplied colour? Do I need to split the RGBA integer into its component integers (R, G, B, A)? I'm using this for a ...
-2
votes
1answer
124 views

GLSL- How to change a certain color of a sprite, to another color passed into the shader?

I have been googling for over an hour, trying to find out how to do something very simple, which I see in tons of games. I tried to understand GLSL, but it seems like a ton of learning for a single, ...
0
votes
1answer
47 views

How to make it two seconds for Time.time?

var targetscript : Diamond; var red : Color; var orange : Color; function Start () { gameObject.camera.backgroundColor = red; } function Update () { if (targetscript.score > 4) { ...
31
votes
6answers
4k views

Do complementary shadows make sense for games?

According to color theory, shadows work better if they don't use pure blacks or grays, but instead use a color that's complementary to the color of the object casting that shadow. That is, if you ...
0
votes
1answer
58 views

How does Texture2D.GetData return coloured pixels?

I'm trying to work out how the pixels are stored in the returned array but I'm not having a lot of luck (and thus my calculations don't seem to be working). I realize that the pixels are stored in ...
21
votes
6answers
3k views

Algorithm to modify a color to make it less similar than background

I'm creating a demo of 20 balls bouncing each other, with a background filled with a solid color. Color for each ball is chosen randomly with randint(0, 255) for each R, G, B tuple component. Problem ...
0
votes
1answer
36 views

OpenGL strange rendering problem when buffers have different sizes

I have encountered a very odd error in my program, "odd" in the sense that everything the API says suggests that the error should not occur. I have a bunch of 2D un-indexed vertex data, and I want to ...
4
votes
1answer
139 views

cost of texture change vs color change

How would I go about determining the difference in cost between changing the render color of an object every frame vice changing the texture (same sheet, just changing the source rectangle) every ...
2
votes
2answers
87 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 ...
14
votes
7answers
2k views

What does the term “channel” mean when used in regards to computer graphics?

I was studying terminology for computer graphics, and this statement came up that confused me. The image can have alpha channels for transparency. I tried searching for the meaning of the term ...
6
votes
2answers
197 views

Tool to simulate color blindness

TLDR: is there an application I can download (or some configuration of Windows, or something) that will let me see how my game will appear to users with different color-blindnesses? There are already ...
6
votes
1answer
370 views

Is white the best base color to start with when planning to shade sprites within Unity?

I'm looking into prototyping a game in Unity which will consist of solid square sprites / tiles. I figure I can represent different types of objects with different colors for each of the tiles in the ...
3
votes
1answer
211 views

Best way to blend colors in tile lighting? (XNA)

I have made a color, decent, recursive, fast tile lighting system in my game. It does everything I need except one thing: different colors are not blended at all: Here is my color blend code: ...
0
votes
2answers
62 views

What is the correct way to reset and load new data into GL_ARRAY_BUFFER?

I am using an array buffer for colors data. If I want to load different colors for the current mesh in real time what is the correct way to do it. At the moment I am doing: glBindVertexArray(vao); ...
2
votes
2answers
105 views

Colorize with a given color a texture

I have a texture and I want to "colorize" it with a given color, lets say cyan (#00ffff) or purple (#800080). What I want to do, is get all the pixel values from the texture, and remove the color and ...
3
votes
2answers
94 views

How can I read the color of a specific pixel in XNA?

I want a way to find out if, for example, the pixel at Vector2(2, 5) on the game window is color Color.Red, or some other color or set of coordinates. How can I do this?
1
vote
1answer
222 views

Why am I not getting an sRGB default framebuffer?

I'm trying to make my OpenGL Haskell program gamma correct by making appropriate use of sRGB framebuffers and textures, but I'm running into issues making the default framebuffer sRGB. Consider the ...
1
vote
1answer
114 views

XNA 4: GetData from Texture2D and Set it into Texture3D with specific order

I am trying to convert my color grading 2d lookup texture into 3d LUT. When I simply use: ColorAtlas.GetData(data); ColorAtlas3D.SetData(data); I get this: I tried building my 2d atlass ...
4
votes
1answer
131 views

Problem building a color grading map

I am trying to build a default color grading map into a 1024x32 RenderTarget. Here is my shader code: VertexShaderOutput VertexShaderFunction(VertexShaderInput input) { VertexShaderOutput output; ...
2
votes
1answer
236 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?
0
votes
0answers
25 views

Any chance to store bloom power in 3 channels with YCbCr color coding?

I need to store per-pixel bloom power in the final Render Target to make Tron-like effects, when even non-bright pixels can bloom. The value can easily be stored in an alpha channel without any magic ...
0
votes
1answer
115 views

How to blend bullet sprite from white to yellow in libgdx

Does anyone have a clue that will make my bullet sprite fade from yellow to white? As the bullet is created it will be white but when it trails on it will turn yellow. Any ideas how? Is it a simple ...
0
votes
1answer
199 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 ...
0
votes
1answer
189 views

How do you calculate a gradient value within multiple colors (gradient stops)

In WPF/Silverlight XAML you can have a brush with multiple gradient stops at different points along the color line. I was able to replicate this behavior with two colors, a single color lerp, from ...
1
vote
1answer
244 views

How do I find two points at an angle on opposite sides of a circle?

With reference to my previous question: I'm using micklh's answer, which works perfectly. However, it calculates the gradient based on two points, a starting point and an ending point. I want to ...
1
vote
2answers
394 views

Sprite collision with color?

Is this possible? To elaborate, I am making a PacMan offshoot. Essentially it is a "zoomed in" version of the game, but the board is randomly generated. I have 11 .png files each to be used as a ...
1
vote
1answer
40 views

2 Images, same object: tone difference and alignment

I would like to know a software which helps in post-production to calculate the general color/tone difference of 2 images. The images contain the same object, but arn't shot from the same position. ...
5
votes
3answers
1k views

How do I create a color picker with variable hue and saturation?

I am trying to create a Color Picker similar to that of MS Paint. Unfortunately, I can't figure out the algorithm for saturation. This is what my current algorithm creates. Anytime I try to ...
0
votes
1answer
81 views

XNA Float values don't work as parameter

With the Microsoft XNA Framework I can change the color of a tinted texture by changing it's integer values like so: Int x = 255; if(true) { x--; tint = new Color(x, 255, 255); } Draw(texture, ...
0
votes
2answers
60 views

Selecting a color that will be readable overlapped upon another? [duplicate]

I've got random circles from random colors of RBG (assume they can be any combination of values). I have some text I want to write on top of them but I want the color to be readable on it no matter ...
1
vote
1answer
227 views

Spot Light color fade in Unity 3d

I have a scene where many spot lights are focused on the screen. All have red color and same intensity. What I want is that the red Color(0,0,0,1) value should increase and decrease in a fading effect ...
0
votes
1answer
978 views

coloring box2d body in LibGDX

I want to color polygon of box2d in LibGDX. Found below useful class for that. http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/ShapeRenderer.html But, it is not ...
1
vote
2answers
151 views

Easy Method to Change Color on UI Elements

This isn't a language-specific thing as far as I'm concerned. I was wondering what may be a quick way to change the COLOR of a certain on-screen element such as a button and its associated text. I ...
2
votes
2answers
138 views

Filling in a shape from vertices

What I'm trying to do is set a bunch of points to create a shape and then fill everything in within those points. It needs to be done in 3D becasue this is being used as a way to generate a texture ...
36
votes
5answers
1k views

Best Way to allow players to “Dye” images without losing color quality?

I am creating a 2.5D isometric (2D images) game. I want the players to be able to "dye" their armor, clothes, and other things. I find that grayscaling everything leads to losing out on some of the ...
2
votes
1answer
94 views

Expandable player boundaries

I'm trying to plan how to implement non-fixed boundaries so the player can expand their controlled territory without using a tiled based system. Each pixel can be fought over for who controls it. I ...
-1
votes
1answer
174 views

XNA changing color alpha

I know I can take a color and multiply it by a float to reduce its alpha like that: Color color = Color.Green * 0.15f; But how do I return the color's alpha to it's original value? I tried doing ...
5
votes
1answer
214 views

Coloring Terrain By Steepness Issue

Also I am attempting to implement some simple coloring by "slope" onto my planet and to do this I take the normal mapped normal "y" component and subtract it from one. Yet I am getting some strange ...
1
vote
1answer
144 views

how to calculate sky color hue in a specific way?

I have a day cicle in my game. I want to add a bluish hue to my terrain in the early morning and evening-night. I want to start transitioning from 0 hue color to the full hue color at 20 PM and reach ...
2
votes
1answer
93 views

Why is it when I render a basic cube, my editor's grid changes too?

I have one HLSL file for DirectX11 that only has input layout for color and position. Then another HLSL file for the simple cube that has position, normal and textures. What I noticed is when I render ...
5
votes
6answers
721 views

Colors for villains, good guys and neutrals

I am looking for 4-6 color schemes for three factions, good, evil and neutral (in a space strategy if that matters). I'd like the player to choose which side they want to play and each side will have ...
7
votes
4answers
598 views

Bright colors versus duller colors

I was talking to a friend the other day and we got onto the discussion about colors in videogames, relating to actual in-game graphics/art. He told me that even though it's easy to see things when ...
1
vote
4answers
321 views

Changing color of a moving image without lowering the fps

I just added an option to my game that makes it so that all the enemies will have a random color for their clothes instead of the regular blue. I use this code to draw rectangles over the shirt of the ...
10
votes
6answers
653 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. ...
0
votes
2answers
572 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 ...