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

learn more… | top users | synonyms

-1
votes
0answers
19 views

Is the palletes from color-hex website are free? [on hold]

I'm really sorry for asking that question but I cannot find anywhere the answer. I want to develop a game and I need some of palletes. The problem is that I am wondering if I can use palletes from ...
1
vote
1answer
428 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 ...
0
votes
0answers
43 views

How do I procedurally generate a histogram from an image?

I have a media player application which uses shaders. I'm searching for the best way to generate a histogram for the displayed image. I've thought of these 2 approaches: Generate histogram using ...
0
votes
1answer
59 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
80 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
1answer
102 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 ...
1
vote
1answer
48 views

Gameobjects disappearing when changing renderer.material.color

I'm generating an array of objects using this code: while(currentPosition.z < poolSize){ var ringObj = GameObject.Instantiate(ring) as GameObject; ...
0
votes
0answers
21 views

Spectral path tracing - image color/brightness incorrect

I implemented a spectral path tracing using physically base BRDF models such as Oren-Nayar,Specular Reflection and Transmission, Lambertian. All calculation in the path tracer uses standard illuminant ...
0
votes
1answer
51 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: Color myColor; Color startColor = new Color(255, 255, 255); Color finalColor = new Color(231, 214, 90); myColor = ...
1
vote
1answer
81 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. Touch touch0 = ...
9
votes
1answer
132 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
99 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, because if I add for example 3rd ...
4
votes
1answer
58 views

Is this converting from or to premultiplied alpha?

I found this code buried under some rocks: var divAlpha = 0xff00/color.A; var r = (byte) (color.R*divAlpha >> 8); var g = (byte) (color.G*divAlpha >> 8); var b = (byte) (color.B*divAlpha ...
4
votes
1answer
182 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 ...
0
votes
0answers
25 views

How to screen color blend spritebatch?

batch.setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); batch.setColor(new Color(0xFF0000FF)); batch.draw(...); Expected result: Current result: How can I achieve something ...
2
votes
0answers
30 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 ...
9
votes
2answers
403 views

How do I simulate color blindness for accessibility testing?

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 good ...
0
votes
1answer
338 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 how can you do this for a specific ...
0
votes
0answers
328 views

Unity 3D - Changing emission color in realtime after export doesn't work

I am using the following code to change material's emission color in realtime: Color selectionColor = new Color(0.3f, 0.2f, 0.0f); void Start() { ...
0
votes
0answers
40 views

Advice on adding RGB values

I am trying to make a flash game (I don't want to say too much). Part of the game is mixing colors. The problem with this is that these are colored wooden tiles and at first I was going to have each ...
1
vote
2answers
67 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
2answers
143 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
2answers
783 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 ...
0
votes
0answers
30 views

show different color areas of image on touch

How do I show colors filled in on a colorless version of an image on user touch. (for example color mania or guess the colors app). I know one way is to provide the same image 3 times (for 3 colors) ...
2
votes
1answer
51 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 ...
0
votes
0answers
29 views

Accurate NTSC Colour Simulation

I'm trying to create a method of displaying an image the way it was intended to be viewed for use with old games and emulators The goal is to apply effects that caused blurring and such to achieve ...
3
votes
2answers
352 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 ...
0
votes
0answers
102 views

Export as .dae, but retain color (all for Unity)

So, I was trying to learn some basic Unity stuff (I am a noob in all respects), and in my early research, I discovered something amazing: I can import 3D meshes that I make into Unity! So, I ...
1
vote
1answer
1k 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 ...
7
votes
5answers
3k 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 color according to a step t, giving it ...
238
votes
12answers
14k 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. ...
1
vote
1answer
219 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? ...
0
votes
2answers
70 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 ...
-2
votes
1answer
488 views

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

There are sprites, with certain pixels being bright pink, and a shader dyes these pink or grayscale pixels to a custom color determined by the player. For example, a character looks normal except for ...
0
votes
1answer
79 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 GL_RGB* (or some other linear format) for normal data or specular highlight maps. We can ...
7
votes
2answers
2k 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 ...
0
votes
1answer
112 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. Further down the page, it describes the ...
0
votes
0answers
67 views

Color from OBJ not displayed in Blender

I want to import some .obj file that I have made with MeshLab. The point cloud file was actually in .pcd format and I used pcl_pcd2ply tools from PCL to change it into PLY-Format. Then I import it ...
0
votes
2answers
68 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
489 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
128 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
372 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 ...
4
votes
1answer
157 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; ...
32
votes
6answers
5k 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
410 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) { ...
0
votes
1answer
75 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 ...
23
votes
6answers
4k 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
77 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
258 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 ...
14
votes
7answers
3k 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 ...