Questions tagged [color]
Color is the visual perception of light by humans into named categories, commonly "red," "green," and "blue."
203
questions
0
votes
2
answers
78
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
1
answer
1k
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 ...
2
votes
1
answer
5k
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
2
answers
499
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
2
answers
542
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 ...
41
votes
5
answers
2k
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
1
answer
118
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
1
answer
795
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 ...
5
votes
1
answer
308
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
1
answer
476
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
1
answer
114
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
6
answers
3k
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 ...
8
votes
4
answers
2k
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
4
answers
735
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
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.
...
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 ...
3
votes
1
answer
1k
views
Rendering a black and white image in OpenGL 1.1
Is there is any way that I can simple disable the color in OpenGL 1.1? Or can I "grey out" textures in LWJGL?
2
votes
1
answer
236
views
Get average tile color
In my 2D game I have TileSet class that loads the texture and creates Rectangle[] array which stores each tile coordinates. Pretty basic stuff. Now I'd like to also calculate and store the average ...
0
votes
1
answer
6k
views
How do I programmatically remove an image's background color?
I have a sprite sheet (image) and want to draw it on screen.
...
0
votes
2
answers
1k
views
Changing colour while keeping gradient
I'm making a Flash game with ActionScript 3 and I have a square with a gradient applied to it. I am trying to programmatically changing the colour of the square depending on time, for example, some ...
0
votes
1
answer
256
views
Make colour change depending on time
I'm making a Flash game (ActionScript 3) and for dynamics I'd like to make the background change colour depending on the clients' time of day.
I have a rough idea on how I want to do this,
At ...
3
votes
2
answers
3k
views
Implementing a color picker [closed]
I'm making a paint program using applets in Java, and I want to create some sort of color palette where the colors blend into each other, similar to this:
However, I'm having trouble understanding ...
1
vote
2
answers
2k
views
How (update,set, apply) dynamically color on a model of a XNA project?
I encounter a problem for set a background color on my model instantiated. I can change the texture but not change color.
Is there a parameter for change the color ? Or change the opacity ? I am ...
11
votes
1
answer
965
views
How to achieve light that changes color mid-way?
I thought of creating light sources, and some colored windows. Now, the windows are semi-transparent. How could I make it so that when the light (say, pure white) hits the glass and continues through ...
4
votes
2
answers
10k
views
What is the color value of daylight?
This is a very short question. I want to implement ambient light in the color of daylight from the sun. What is the color value of sun light?
312
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.
...
7
votes
2
answers
563
views
2-components color model
RGB is the natural color model for OpenGL. But a lot of other color models exist.
For example, CMY(K) for printers, YUV for JPEG, the little cousins YCbCr and YCoCg, HSL & HSV from the 70's, and ...
0
votes
2
answers
604
views
LWJGL - OpenGL - Texture shading
I want to use LWJGL to create a shader that all it does is change the color of the given texture. For example I tell it to draw the letter A using a sprite sheet then I can tell the shader to draw the ...
0
votes
1
answer
1k
views
Color Picking Troubles - LWJGL/OpenGL
I'm attempting to check which object the user is hovering over. While everything seems to be just how I'd think it should be, I'm not able to get the correct color due to the second time I draw (...
29
votes
5
answers
22k
views
Given a RGB color x, how to find the most contrasting color y? [duplicate]
Possible Duplicate:
Making a symbol appear on any colour
I have to mark a certain item in a way that will make it stick-out in the background. I need it to be surrounded with the color that ...
0
votes
2
answers
504
views
gradient coloring of an object
I have an object(FBX format) in my project, it's a line drawn in 3D max. I want to color the line in XNA so that the color starts from a specific RGB color in both the start and end points of the line ...
1
vote
0
answers
197
views
Direct X Vertex Coloring [closed]
So I've been messing around with directx 9 for the past few days, and I recently bump in a simple problem of vertex coloring. Can someone here with directx9 expirience solve this problem? I would ...
2
votes
1
answer
2k
views
Blending colors on Surfaces in PyGame?
So I'm making a game in Python and PyGame. I have aliens and blocks that each adopt one of several colors; rather than make several copies of them in different colors, I plan on making the sprite ...
1
vote
1
answer
2k
views
Slick2D: Changing an Image's colour to Color.white
I am working on a game where we would like the enemies to flash white when hit by a bullet. Ideally, we would like to use the same mechanism to render an Image in any colour. Our Images are all png ...
3
votes
1
answer
3k
views
*DX11, HLSL* - Colour as 4 floats or one UINT
With the DX11 pipeline, would it be much quicker for the vertex buffer to pass one single UINT with one byte per channel to the input assembler, as opposed to three floats? Then the vertex shader ...
6
votes
1
answer
200
views
Excluding Background from Color Picking
I've implemented picking based on color coding, but I don't want the background color to be pickable. Is there any way in openGL (2.x) to exclude the background color? For some reason, doing glClear(...
2
votes
4
answers
5k
views
How do you blend multiple colors in HSV (polar) color-space?
In RGB color space, you can do a weighted multiple-color blend by just doing:
Start with R = G = B = 0. Then we perform a blend at index i using a set of colors C, and a set of normalized weights w ...
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 ...
4
votes
2
answers
760
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 ...
2
votes
1
answer
331
views
Shader and Custom Vertex Format Errors
I am creating an editor of sorts that allow you to create 3D voxel models. I just got started and have ran into a few errors. Here is what it is producing:
I think the problem has to do with the way ...
-1
votes
2
answers
425
views
Could a large number, such as 255.000255 be converted to it's RGB channels in a Shader language?
If I had a Vertex Shader constant holding one float value, like:
255.000255
Where: The first 3 numbers are actually red (255), next three are green (000), then ...
2
votes
1
answer
295
views
How can I get the texture color data from GLEED2D's level file?
I've hit a little snag in my game. It's a 2D platform game and I need to check for collisions against the level. I'm using GLEED2D to create the map.
I'd like to do per-pixel collision checking, but I ...
3
votes
4
answers
4k
views
OpenGL gradient banding on Samsung Galaxy S2 Android phone
I've got a live wallpaper out on the market which uses OpenGL to render some basic shapes and a flat plane. The simple lighting creates a gradient effect across the plane, which looks fine on most ...
28
votes
4
answers
70k
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?
0
votes
4
answers
8k
views
How do you find the "best" color palette for a game?
If I want to make a 3D game, and I want all my textures to be 8 bit, to save RAM, that is 256 indexed colors, including "transparent", how do I choose the colors?
Is there any recommended pre-defined ...
1
vote
1
answer
256
views
Image drawing tools (that aren't Photoshop) that work in the sRGB colorspace
I'm looking for a way to create sRGB raster images. Now, I could use Inkscape and just have it render to a raster format, but are there any image drawing tools other than Photoshop that work in sRGB?
...
1
vote
1
answer
762
views
OpenGL ES Faces appear to be transparent when alpha is 1.0?
I am working on an object (OBJ File) loader for my app on iOS, currently I have successfully read the vertices and the faces of the object, and I am now just adding colours to the imported models.
I ...
5
votes
4
answers
3k
views
Fading to transparent with premultiplied alpha
I'm fading an object from fully visible to transparent, but the fade darkens the object.
this.Color = Color.Lerp(Color.White, Color.Transparent, weight);
The ...
2
votes
1
answer
608
views
Hemicube algorithm d3d9 or d3d11, float valued colors
The hemicube algorithm renders the scene to 5 sides of a half-cube, from the perspective of each polygon.
Assume you place the hemicube around me and render to the 5 sides. The idea is, we can see ...
2
votes
1
answer
1k
views
Java how to color text without using JNI?
I am working on a small text-based game in Java. I am trying to understand the concept of how to color the output without needing to use JNI. C++ has the ability to modify the console directly and ...